ENH: make conda buildable + py 3.10 #334
Workflow file for this run
This file contains 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: Test and build | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
pip install -q ruff | |
- name: Ruff | |
uses: chartboost/ruff-action@v1 | |
build-and-test: | |
needs: lint | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# necessary for versioneer | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-version: 'latest' | |
auto-update-conda: true | |
python-version: '3.10' | |
- name: Run tests | |
# ugly because I wanted to keep one location of dependencies | |
run: | | |
python -m pip install --upgrade pip | |
make create-env | |
conda activate ritme && make dev && make test-cov | |
- name: Hack - template coverage output path | |
run: echo "COV=coverage xml -o $GITHUB_WORKSPACE/coverage.xml" >> $GITHUB_ENV | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |