Skip to content

ENH: tracked R2 metric (#28) #265

ENH: tracked R2 metric (#28)

ENH: tracked R2 metric (#28) #265

Workflow file for this run

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.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install -q https://github.com/qiime2/q2lint/archive/master.zip
pip install -q flake8
- name: Lint
run: make lint
build-and-test:
needs: lint
strategy:
matrix:
# todo: include macos once repos is public
# os: [ubuntu-latest, macos-latest]
os: [ubuntu-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.8
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
- 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
# # TODO: include this once this is a Q2 plugin and remove above run tests
# - uses: qiime2/action-library-packaging@alpha1
# with:
# package-name: q2-ritme
# additional-tests: ${{ env.COV }}
# build-target: dev
# library-token: ${{ secrets.LIBRARY_TOKEN }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
# TODO: remove token when repos is public
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true