-
Notifications
You must be signed in to change notification settings - Fork 0
Adds Pipenv workflow #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| name: Python Pipenv | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| workflow-path: | ||
| description: Workflow file used for change detection. | ||
| required: false | ||
| type: string | ||
| working-directory: | ||
| description: Relative path under $GITHUB_WORKSPACE where the project is located. | ||
| required: false | ||
| type: string | ||
|
|
||
| jobs: | ||
| pre-checks: | ||
| name: Pre-checks | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| should-skip: ${{ steps.skip-check.outputs.should_skip }} | ||
|
|
||
| steps: | ||
| - id: skip-check | ||
| uses: fkirc/skip-duplicate-actions@v3.4.1 | ||
| with: | ||
| concurrent_skipping: same_content | ||
| do_not_skip: >- | ||
| [ | ||
| "push", | ||
| "schedule", | ||
| "workflow_dispatch" | ||
| ] | ||
| paths: >- | ||
| [ | ||
| ".tool-versions", | ||
| "${{ inputs.workflow-path }}", | ||
| "${{ inputs.working-directory }}/**" | ||
| ] | ||
| skip_after_successful_duplicate: true | ||
|
|
||
| setup: | ||
| name: Setup | ||
| needs: [pre-checks] | ||
| if: ${{ needs.pre_checks.outputs.should-skip != 'true' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Python | ||
| uses: equisoft-actions/setup-python@v1.0.0 | ||
|
|
||
| unit-tests: | ||
| name: Unit tests | ||
| needs: [setup] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Python | ||
| uses: equisoft-actions/setup-python@v1.0.0 | ||
|
|
||
| - name: Run pytest | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: pipenv run pytest -v | ||
|
|
||
| type-check: | ||
| name: Type check | ||
| needs: [setup] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Python | ||
| uses: equisoft-actions/setup-python@v1.0.0 | ||
|
|
||
| - name: Run pytype | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: pipenv run pytype | ||
|
|
||
| code-style: | ||
| name: Code style | ||
| needs: [setup] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Python | ||
| uses: equisoft-actions/setup-python@v1.0.0 | ||
|
|
||
| - name: Run pycodestyle | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: pipenv run pycodestyle --statistics --count | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Python Security | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| working-directory: | ||
| description: Relative path under $GITHUB_WORKSPACE where the project is located. | ||
| required: false | ||
| type: string | ||
|
|
||
| jobs: | ||
| secrets: | ||
| name: Secret scan | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Run secret scanner | ||
| uses: kronostechnologies/actions/scan-secrets@v0.0.20 | ||
|
|
||
| sast: | ||
| name: SAST | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Python | ||
| uses: equisoft-actions/setup-python@v1.0.0 | ||
|
|
||
| - name: Run Semgrep | ||
| run: make check.sast | ||
kbeaulieu marked this conversation as resolved.
Show resolved
Hide resolved
meriouma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Upload SAST report | ||
| uses: actions/upload-artifact@v2 | ||
| if: always() | ||
| with: | ||
| name: semgrep-${{ inputs.working-directory }}.sarif | ||
| path: ${{ inputs.working-directory }}/build/reports/semgrep/semgrep.sarif | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.