Merge pull request #46 from DeepKnowledge1/develop (#47) #24
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: [develop, main] | |
| pull_request: | |
| branches: [develop, main] | |
| # cancel redundant runs on the same branch/PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.9']#, '3.10', '3.11', '3.12'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install pipx | |
| run: python -m pip install --upgrade pip pipx | |
| - name: Install Poetry via pipx | |
| run: pipx install poetry | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --no-root | |
| - name: Run tests | |
| run: poetry run pytest -q | |
| # (Optional) save test results / coverage if you add them later | |
| # - name: Upload pytest cache | |
| # if: always() | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: pytest-cache-${{ matrix.python-version }} | |
| # path: .pytest_cache | |
| # | |
| # - name: Upload coverage XML | |
| # if: always() | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: coverage-${{ matrix.python-version }} | |
| # path: coverage.xml | |
| # Example: only run extra checks on main (optional) | |
| # main-only: | |
| # if: github.ref == 'refs/heads/main' | |
| # needs: tests | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - run: echo "Do deployment or tagging here" |