Refactor GitHub Actions workflow to limit triggers to the main branch #19
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python environment and install dependencies | |
| uses: ./.github/actions/setup | |
| with: | |
| python-version: "3.10" | |
| - name: Ruff Check | |
| run: poetry run ruff check | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python environment and install dependencies | |
| uses: ./.github/actions/setup | |
| with: | |
| python-version: "3.9" | |
| - name: Ruff Check | |
| run: poetry run pytest tests |