diff --git a/.github/workflows/test.yml b/.github/workflows/check.yml similarity index 61% rename from .github/workflows/test.yml rename to .github/workflows/check.yml index ddc5086..adf0a53 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/check.yml @@ -1,12 +1,13 @@ -name: Test +name: Lint and Test on: push: branches: - - "**" + - "main" + pull_request: jobs: - pytest: + setup: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,5 +17,17 @@ jobs: python-version: "3.12" - name: install dependencies run: pip install -r requirements-dev.txt + + lint: + runs-on: ubuntu-latest + needs: setup + steps: + - name: run linter + run: black src + + pytest: + runs-on: ubuntu-latest + needs: setup + steps: - name: run tests run: pytest