-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Union of backend and frontend scans in the same workflow and addition…
… of Flake8 and isort scans for the backend
- Loading branch information
Showing
7 changed files
with
97 additions
and
81 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,76 @@ | ||
name: Code style | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
backend: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- tool: black | ||
arguments: --check src/backend/ | ||
working_directory: . | ||
- tool: isort | ||
arguments: src/backend/ --check-only | ||
working_directory: . | ||
- tool: mypy | ||
arguments: --namespace-packages --package backend --install-types --non-interactive | ||
working_directory: ./src | ||
- tool: flake8 | ||
arguments: --ignore=E501 src/backend | ||
working_directory: . | ||
name: ${{ matrix.tool }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -r src/backend/requirements-dev.txt | ||
- uses: dorny/paths-filter@3c49e64ca26115121162fb767bc6af9e8d059f1a | ||
id: changes | ||
with: | ||
filters: | | ||
backend: | ||
- 'src/backend/**' | ||
- name: Check | ||
working-directory: ${{ matrix.working_directory }} | ||
if: ${{ steps.changes.outputs.backend == 'true' || github.event_name != 'pull_request' }} | ||
run: ${{ matrix.tool }} ${{ matrix.arguments }} | ||
|
||
frontend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install ESLint | ||
working-directory: src/frontend | ||
run: | | ||
npm install . | ||
npm install -g eslint | ||
- uses: dorny/paths-filter@3c49e64ca26115121162fb767bc6af9e8d059f1a | ||
id: changes | ||
with: | ||
filters: | | ||
frontend: | ||
- 'src/frontend/**' | ||
- name: ESLint check | ||
if: ${{ steps.changes.outputs.frontend == 'true' || github.event_name != 'pull_request' }} | ||
run: eslint src/frontend/ --ext .js,.jsx,.ts,.tsx |
This file contains 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,17 @@ | ||
name: Software Supply Chain | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
pull_request: | ||
|
||
jobs: | ||
legitify: | ||
name: Legitify | ||
runs-on: ubuntu-latest | ||
environment: github | ||
steps: | ||
- name: Legitify | ||
uses: Legit-Labs/legitify@d64d18810d9093458f11731c3a0a36d7e573187e | ||
with: | ||
github_token: ${{ secrets.ADMIN_PAT }} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
-r requirements.txt | ||
black==23.12.1 | ||
coverage==7.3.4 | ||
flake8==6.1.0 | ||
isort==5.13.2 | ||
mypy==1.8.0 |