Migrate to Pixi-based pyproject.toml setup #3015
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: pyjanitor tests | |
| on: | |
| # only run tests and coverage when src-code changes | |
| push: | |
| branches: | |
| - dev | |
| paths: | |
| - "janitor/**" | |
| - "tests/**" | |
| - "pyproject.toml" | |
| - ".github/workflows/tests.yml" | |
| pull_request: | |
| branches: | |
| - dev | |
| paths: | |
| - "janitor/**" | |
| - "tests/**" | |
| - "pyproject.toml" | |
| - ".github/workflows/tests.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| environment: [py311, py312, py313] | |
| runs-on: ubuntu-latest | |
| name: Run pyjanitor test suite (Python ${{ matrix.environment }}) | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Pixi Environment | |
| uses: prefix-dev/[email protected] | |
| with: | |
| pixi-version: latest | |
| cache: true | |
| cache-write: true | |
| environments: ${{ matrix.environment }} | |
| - name: Run docstrings tests | |
| run: pixi run -e ${{ matrix.environment }} pytest -v -r a -n auto --color=yes --durations=0 --cov=janitor --cov-append --cov-report term-missing --cov-report xml --doctest-modules --ignore=tests janitor | |
| - name: Run unit tests | |
| run: pixi run -e ${{ matrix.environment }} pytest -v -r a -n auto --color=yes --durations=0 --cov=janitor --cov-append --cov-report term-missing --cov-report xml tests | |
| # https://github.com/codecov/codecov-action | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@v2 | |
| with: | |
| # fail_ci_if_error: true # optional (default = false) | |
| verbose: true # optional (default = false) |