Skip to content

Merge pull request #23 from conda-incubator/use-pixi-rattler-build #98

Merge pull request #23 from conda-incubator/use-pixi-rattler-build

Merge pull request #23 from conda-incubator/use-pixi-rattler-build #98

Workflow file for this run

name: conda-auth tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
# detect whether any code changes are included in this PR
changes:
runs-on: ubuntu-latest
permissions:
# necessary to detect changes
# https://github.com/dorny/paths-filter#supported-workflows
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v3
# dorny/paths-filter needs git clone for push events
# https://github.com/dorny/paths-filter#supported-workflows
if: github.event_name != 'pull_request'
- uses: dorny/[email protected]
id: filter
with:
filters: |
code:
- 'conda_auth/**'
- 'tests/**'
- '*.py'
- 'recipe/**'
- '.github/workflows/tests.yml'
tests:
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.11"]
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
steps:
- uses: actions/checkout@v3
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.6.0
cache: true
- name: Install dependencies
run: |
pixi add python=${{ matrix.python-version }}
pixi install
- name: Run test and generate coverage
run: pixi run testcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: ${{ runner.os }},${{ matrix.python-version }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}