Feature: upgrade dev env #38
Workflow file for this run
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
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"] | |
env: | |
CHANGED_PYTHON_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: Install SCA Python tools | |
run: | | |
pip install \ | |
pre-commit \ | |
ruff \ | |
pyupgrade \ | |
mypy | |
- name: Run pre-commit SCA checks | |
run: | | |
pre-commit run --files ${{env.CHANGED_PYTHON_FILES}} --color="always" |