Enhance documentation #66
Workflow file for this run
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: Build and Test Package | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push or pull request events but only for | |
| # the main branch and the otter (staging) branch | |
| push: | |
| branches: [ main, otter ] | |
| pull_request: | |
| branches: [ main, otter ] | |
| # Allows to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| lint_check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check-out repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[lint] | |
| - name: Run ruff formatter | |
| run: | | |
| ruff check . | |
| build_and_test_package: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.10", "3.13"] | |
| steps: | |
| - name: Check-out repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[tests] | |
| - name: Run tests with coverage | |
| run: | | |
| pytest --cov --cov-branch --cov-report=xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |