Merge pull request #1 from opera-adt/dependabot/github_actions/mamba-… #4
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: Pytest, build docker image, push to GHCR | |
| on: [pull_request, push] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| env: | |
| # https://github.com/pytest-dev/pytest/issues/2042#issuecomment-429289164 | |
| PY_IGNORE_IMPORTMISMATCH: 1 | |
| jobs: | |
| pytest: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| deps: | |
| - label: Latest | |
| spec: "" | |
| - label: Minimum | |
| spec: >- | |
| python=3.9 | |
| fail-fast: false | |
| name: ${{ matrix.os }} • ${{ matrix.deps.label }} | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup environment | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: environment.yml | |
| environment-name: synth-env | |
| generate-run-shell: false | |
| create-args: ${{ matrix.deps.spec }} | |
| condarc: | | |
| channels: | |
| - conda-forge | |
| - name: Install | |
| run: | | |
| pip install --no-deps . | |
| - name: Install test dependencies | |
| run: | | |
| micromamba install -f tests/requirements.txt -c conda-forge | |
| - name: Test | |
| run: | | |
| pytest -n0 |