Merge pull request #70 from huishenlab/annot_demux_refactor #84
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: Run Pytest | |
| on: | |
| push: | |
| branches: [main, dev, annot_demux_refactor] | |
| pull_request: | |
| branches: [main, dev, annot_demux_refactor] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| activate-environment: tranquillyzer | |
| environment-file: environment.yml | |
| auto-activate-base: false | |
| miniforge-variant: Mambaforge | |
| miniforge-version: 22.9.0-2 | |
| use-mamba: true | |
| python-version: "3.10.12" | |
| - name: Install Python packages (extra) | |
| shell: bash -l {0} | |
| run: | | |
| pip install -e . | |
| pip install pytest pytest-order pytest-cov | |
| - name: Download model and reference | |
| shell: bash -l {0} | |
| run: | | |
| mkdir -p tests/10x3p/data tests/references | |
| curl -L "https://www.dropbox.com/scl/fi/k18rs7icrw7la7ogoi9bh/10x3p_sc_ont_013.h5?rlkey=ssw6ylhpvwe3e96jmwm0j3pzg&st=5byhrx7t&dl=0" -o models/10x3p_sc_ont_013.h5 | |
| curl -L "https://www.dropbox.com/scl/fi/2plk01thb9q1o8gqgmgks/10x3p_sc_ont_013_params.yaml?rlkey=twtqwmpsyv6ecqeh7a2c5k6tx&dl=0" -o models/10x3p_sc_ont_013_params.yaml | |
| curl -L "https://www.dropbox.com/scl/fi/inz070k8k7kfpibnj9lkt/10x3p_sc_ont_013_lbl_bin.pkl?rlkey=pwhonyomb3i4d13yjat8cxpro&dl=0" -o models/10x3p_sc_ont_013_lbl_bin.pkl | |
| curl -L "https://www.dropbox.com/scl/fi/9203pc2gz45u419kze446/hg38_gencode_chr21.fa?rlkey=k1co80pso7zsvb8oiqqc1o1dy&st=e0e92h5h&dl=1" -o tests/references/hg38_gencode_chr21.fa | |
| curl -L "https://www.dropbox.com/scl/fi/9zvh26moro7frfho818ko/hg38_gencode_chr21.gtf?rlkey=v3s05m9ap3srpjhvl5yfjfeq7&st=hn6mufoq&dl=0" -o tests/references/hg38_gencode_chr21.gtf | |
| - name: Run Pytest with coverage | |
| shell: bash -l {0} | |
| run: | | |
| pytest --maxfail=1 -q \ | |
| --cov=. \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml:coverage.xml | |
| - name: Combine coverage (explicit) | |
| shell: bash -l {0} | |
| run: | | |
| python - <<'PY' | |
| import coverage | |
| cov = coverage.Coverage(data_file=".coverage") | |
| cov.load() | |
| cov.combine() | |
| cov.xml_report(outfile="coverage.xml") | |
| PY | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage.xml | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |