Skip to content

Commit

Permalink
ci: check style on push/pull request
Browse files Browse the repository at this point in the history
This re-uses the pre-commit configuration.
  • Loading branch information
niheconomoum committed Jan 10, 2024
1 parent fd88af9 commit a1c3f25
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Continuous Integration

# Trigger this workflow manually, by pushing commits to any branch, or
# by filing a pull request.
on:
workflow_dispatch:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
setup:
runs-on: ubuntu-latest
steps:
- id: cache-workdir
uses: actions/cache@v3
with:
key: workdir-${{ github.sha }}
path: .
- if: steps.cache-workdir.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- run: python -m pip install .

lint:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/cache/restore@v3
with:
key: workdir-${{ github.sha }}
path: .
- uses: pre-commit/[email protected]

0 comments on commit a1c3f25

Please sign in to comment.