Skip to content

Commit

Permalink
ci: Reuse workflow for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Nov 26, 2024
1 parent 0390eac commit 891aad5
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,9 @@
name: Lint
on: [push, pull_request]
env:
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/main
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
env:
PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- id: changed-files
uses: tj-actions/changed-files@v45
- uses: pre-commit/action@v3.0.1
continue-on-error: true
with:
extra_args: pip-compile --files ${{ steps.changed-files.outputs.all_changed_files }}
- if: ${{ env.PAT }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[github-actions] pre-commit autoupdate'
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
- run: pip install -r requirements_dev.txt
- run: pytest /tmp/test_requirements.py
lint:
uses: open-contracting/.github/.github/workflows/lint.yml@main
permissions:
contents: write
with:
python-version: '3.10'

0 comments on commit 891aad5

Please sign in to comment.