Skip to content

Commit

Permalink
Use reusable workflow for code quality checks
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Mar 11, 2024
1 parent 98c9c16 commit 717c477
Showing 1 changed file with 1 addition and 41 deletions.
42 changes: 1 addition & 41 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,7 @@ permissions: read-all
# https://github.com/marketplace/actions/docker-layer-caching
jobs:
code-quality:
runs-on: ubuntu-latest
permissions:
# For trunk to post annotations
checks: write
# For repo checkout
contents: read
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install dependencies
run: |
python -m pip install "poetry==1.6.1"
poetry config virtualenvs.create false
poetry install --no-cache
poetry install --only-root
- name: Export PYTHONPATH
run: |
poetry show
echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
arguments: --ci

- name: Check code contains no FIXME's
run: |
git grep -r --no-color ${case_sensitive} --line-number -e "FIXME" :^.github
if [[ $? -eq 0 ]]; then
# if we found any FIXME entries in checked in files, fail on main
exit 1
else
exit 0
fi
shell: bash {0}
uses: climatepolicyradar/reusable-workflows/.github/workflows/python-precommit-validator.yml@main

test:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 717c477

Please sign in to comment.