Feature/improvements llm app #44
Workflow file for this run
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
name: Gatekeeper checks | |
on: | |
pull_request: | |
branches: [main] | |
# add option to launch manually | |
workflow_dispatch: | |
# jobs to run: | |
jobs: | |
SCA-python: | |
# FIXME: only run job if not draft PR and gatekeeper tag was added | |
#if: github.event.pull_request.draft == false && startsWith(github.ref, 'refs/tags/gatekeeper') | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04] | |
python-version: ["3.12"] | |
node-version: ["22.14.0"] | |
env: | |
CHANGED_FILES: $(git diff --diff-filter=d --name-only origin/$GITHUB_BASE_REF origin/$GITHUB_HEAD_REF) | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python (${{ matrix.python-version }}) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Node (${{ matrix.python-version }}) | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install SCA Python tools | |
run: | | |
pip install \ | |
pre-commit \ | |
ruff \ | |
pyupgrade \ | |
mypy | |
- name: Install node/npm tools | |
run: | | |
sudo apt-get update && sudo apt-get install -y curl \ | |
&& curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash - && sudo apt-get install -y nodejs \ | |
&& npm install -g npm@latest \ | |
&& npm install @eslint/css eslint eslint-plugin-react eslint-plugin-json eslint-plugin-markdown eslint-plugin-css | |
- name: Run pre-commit SCA checks | |
run: | | |
pre-commit run --files ${{env.CHANGED_FILES}} --color="always" |