-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #120
- Loading branch information
Showing
14 changed files
with
392 additions
and
142 deletions.
There are no files selected for viewing
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,70 @@ | ||
# SPDX-FileCopyrightText: © 2024 Kevin Lu | ||
# SPDX-Licence-Identifier: AGPL-3.0-or-later | ||
name: Lint pipeline code | ||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- src/**/* | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- src/**/* | ||
permissions: {} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
# https://github.com/DataDog/guarddog | ||
guarddog: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- run: pip install guarddog | ||
- run: guarddog pypi verify src/requirements.txt --output-format sarif --exclude-rules repository_integrity_mismatch > guarddog.sarif | ||
- uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
category: guarddog-builtin | ||
sarif_file: guarddog.sarif | ||
# https://github.com/astral-sh/ruff | ||
lint-python: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- run: pip install ruff | ||
- run: ruff format --check src | ||
- run: ruff check --output-format=github src | ||
if: ${{ !cancelled() }} | ||
- run: ruff check --output-format=sarif src > ruff.sarif | ||
- uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
category: ruff | ||
sarif_file: ruff.sarif | ||
lint-typescript: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: | | ||
/* | ||
!/data/ | ||
sparse-checkout-cone-mode: false | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
- run: yarn | ||
- run: yarn prettier --check 'src/**/*.{js,ts}' | ||
- if: ${{ !cancelled() }} | ||
run: yarn eslint 'src/**/*.ts' |
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 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 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
Oops, something went wrong.