From b52ab454c71cca940485e2fe429bf60c8972a9f6 Mon Sep 17 00:00:00 2001 From: skchronicles Date: Wed, 16 Mar 2022 17:24:54 -0400 Subject: [PATCH] Adding ci workflows to build docs and run tests --- .github/workflows/docs.yml | 18 ++++++++++++++++++ .github/workflows/main.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..f0c554b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,18 @@ +name: docs +on: + workflow_dispatch: + push: + paths: + - 'docs/**' + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - run: pip install --upgrade pip + - run: pip install -r docs/requirements.txt + - run: mkdocs gh-deploy --force diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..7d66e2a --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,30 @@ +name: tests + +on: + push: + branches: + - master + - main + pull_request: + branches_ignore: [] + +jobs: + Dry_Run_and_Lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: docker://snakemake/snakemake:v5.24.2 + - name: Dry Run with test data + run: | + docker run -v $PWD:/opt2 snakemake/snakemake:v5.24.2 \ + /opt2/metavirs run --input \ + /opt2/.tests/WT_S1.R1.fastq.gz /opt2/.tests/WT_S1.R2.fastq.gz \ + /opt2/.tests/WT_S2_R1.fastq.gz /opt2/.tests/WT_S2_R2.fastq.gz \ + /opt2/.tests/WT_S3_1.fastq.gz /opt2/.tests/WT_S3_2.fastq.gz \ + /opt2/.tests/WT_S4_R1.001.fastq.gz /opt2/.tests/WT_S4_R2.001.fastq.gz \ + --output /opt2/output --mode local --dry-run + - name: Lint Workflow + continue-on-error: true + run: | + docker run -v $PWD:/opt2 snakemake/snakemake:v5.24.2 snakemake --lint -s /opt2/output/workflow/Snakefile -d /opt2/output || \ + echo 'There may have been a few warnings or errors. Please read through the log to determine if its harmless.'