-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main, preprod, prod ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '35 10 * * 6' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
Check notice Code scanning / CodeQL Workflow Should Use Default Setup Note
CodeQL Action could use default setup instead of advanced configuration.
|
||
uses: github/codeql-action/autobuild@v1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Test coverage report | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ 3.9 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
poetry install | ||
- name: Run pytest | ||
run: | | ||
poetry run python -m pytest --cov=./ | ||
poetry run python -m coverage xml -i | ||
- name: Codecov | ||
uses: codecov/[email protected] | ||
Check warning Code scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium test
Unpinned 3rd party Action 'Test coverage report' step
Uses Step Error loading related location Loading |
||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true | ||
|
||
lint: | ||
Check warning Code scanning / CodeQL Workflow does not contain permissions Medium test
Actions Job or Workflow does not set permissions
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ 3.9 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
poetry install | ||
- name: Run black | ||
run: poetry run black --check . | ||
- name: Run isort | ||
run: poetry run isort --check . | ||
|
||
# check-types: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: [ 3.9 ] | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Install dependencies | ||
# run: | | ||
# pip install poetry | ||
# poetry install | ||
# - name: Run mypy | ||
# run: poetry run mypy . | ||
Check warning Code scanning / CodeQL Workflow does not contain permissions Medium test
Actions Job or Workflow does not set permissions
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.