Measurement MWP #83
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
| # This workflow will for a variety of Python versions | |
| # - install the code base | |
| # - lint the code base | |
| # - test the code base | |
| # - upload the test coverage to codecov | |
| # | |
| # It will also | |
| # - build the package | |
| # - check the package | |
| # | |
| # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
| name: CI using Pixi | |
| on: [push, pull_request] | |
| jobs: | |
| Code_Consistency: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Pixi | |
| uses: ./.github/actions/setup-pixi | |
| - name: Run linting | |
| run: pixi run lint | |
| - name: Suggestion to fix lint issues | |
| if: ${{ failure() }} | |
| run: | | |
| echo "::notice::In project root run 'pixi run lint-fix' and commit changes to fix issues." | |
| exit 1 | |
| - name: Run formatting | |
| run: pixi run format-check | |
| - name: Suggestion to fix format issues | |
| if: ${{ failure() }} | |
| run: | | |
| echo "::notice::In project root run 'pixi run format' and commit changes to fix issues." | |
| exit 1 | |
| Code_Testing: | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ['3.11', '3.12', '3.13'] | |
| os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.0 | |
| with: | |
| run-install: false | |
| cache: false | |
| post-cleanup: false | |
| - name: Set Python version | |
| run: pixi add python=${{ matrix.python-version }} | |
| - name: Install dependencies and run tests | |
| run: pixi run -e dev test | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| name: unit-tests-job | |
| flags: unittests | |
| files: ./coverage-unit.xml | |
| fail_ci_if_error: true | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: EasyScience/imaging-lib | |
| Package_Testing: | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Pixi | |
| uses: ./.github/actions/setup-pixi | |
| - name: Build package | |
| run: pixi run build | |
| - name: Run tox tests | |
| run: pixi run tox |