Adding shell script for generating stats and running checkm2 #24
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
# This file configures the continuous integration (CI) system on GitHub. | |
# Introductory materials can be found here: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions. | |
# Documentation for editing this file can be found here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: Tests | |
on: | |
pull_request: | |
push: | |
jobs: | |
# lint: | |
# name: Code Quality | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# python-version: [ "3.12", "3.10" ] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: "Install python" | |
# uses: "astral-sh/setup-uv@v3" | |
# with: | |
# enable-cache: true | |
# cache-dependency-glob: "pyproject.toml" | |
# - name: "Run command" | |
# run: | | |
# uvx -p ${{ matrix.python-version }} --with tox-uv tox -e ${{ matrix.tox-command }} | |
generate_suppl_files: | |
name: Generate extra files | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: 3.8 | |
activate-environment: genome_loader_env | |
environment-file: env.yml | |
auto-activate-base: false | |
- name: Run tests | |
shell: bash -l {0} | |
continue-on-error: true | |
run: | | |
bash scripts/run_tools.sh tests/data/genome_paths.json test_results | |
- name: upload artefacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: test_results/ | |
tests: | |
name: Run tests (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# os: ["ubuntu-22.02", "ubuntu-24.04"] | |
# python-version: ["3.10", "3.11", "3.12"] | |
os: ["ubuntu-24.04"] | |
python-version: ["3.8"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
activate-environment: genome_loader_env | |
environment-file: env.yml | |
auto-activate-base: false | |
- name: install prerequisites | |
shell: bash -l {0} | |
run: pip install -r requirements.txt | |
- name: Run tests | |
shell: bash -l {0} | |
continue-on-error: true | |
run: pytest --cov=genome_loader_scripts --cov-report=xml tests/ | |
- name: Send to Codecov | |
id: send_to_codecov | |
continue-on-error: true | |
uses: codecov/codecov-action@main | |
with: | |
files: coverage.xml | |
# fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Run tests | |
shell: bash -l {0} | |
continue-on-error: true | |
run: | | |
stats.sh --format=8 in=tests/data/FW305-C-112.1/FW305-C-112.1_scaffolds.fna,tests/data/FW305-3-2-15-C-TSA1/FW305-3-2-15-C-TSA1_scaffolds.fna > tests/data/fna-stats.json | |
checkm2 database --download | |
mkdir tests/data/checkm2 | |
checkm2 predict --threads 10 --input tests/data/FW305-3-2-15-C-TSA1/FW305-3-2-15-C-TSA1_scaffolds.fna tests/data/FW305-C-112.1/FW305-C-112.1_scaffolds.fna -o tests/data/checkm2 | |
- name: upload artefacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: tests/ |