replaced thumbs-up with check in logo #69
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: Docker Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
R-CMD-check: | |
runs-on: ubuntu-latest | |
container: | |
image: rocker/verse:latest | |
strategy: | |
matrix: | |
TEST_DATA: [ | |
"inst/extdata/ExampleDb.tsv", | |
"test_repertoires/airr-covid-19.tsv", | |
"test_repertoires/PRJNA381394_12.tsv" | |
] | |
FORMAT: [ | |
"html", | |
"pdf" | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") | |
BiocManager::install(c("Biostrings", "GenomicAlignments", "IRanges")) | |
install.packages(c("airr", "alakazam", "ape", "ggpubr", "kableExtra", "optparse")) | |
shell: Rscript {0} | |
- name: Document | |
run: | | |
devtools::document() | |
shell: Rscript {0} | |
- name: Check | |
env: | |
_R_CHECK_CRAN_INCOMING_: false | |
run: | | |
options(crayon.enabled=TRUE) | |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--run-donttest"), error_on="warning", check_dir="check") | |
shell: Rscript {0} | |
- name: Show testthat output | |
if: always() | |
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | |
shell: bash | |
- name: Install repcred | |
run: | | |
devtools::install(".") | |
shell: Rscript {0} | |
- name: Run tests matrix | |
run: | | |
inst/repcred.R -r ${{ matrix.TEST_DATA }} -o outdir -d TRUE -f ${{ matrix.FORMAT }} | |
- name: Create artifact name | |
run: | | |
test_name="${{ matrix.FORMAT }}_${{ matrix.TEST_DATA }}" | |
artifact_name=$(echo -n "$test_name" | sed -e 's/\//_/g' | sed -e 's/.tsv$//g' ) | |
echo "ARTIFACT_NAME=$artifact_name" >> $GITHUB_ENV | |
- name: Archive results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "repcred-report_${{ env.ARTIFACT_NAME }}" | |
path: | | |
outdir/results | |
build-container: | |
runs-on: ubuntu-latest | |
needs: R-CMD-check | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push to Docker | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./docker | |
file: ./docker/Dockerfile | |
push: true | |
no-cache: true | |
tags: airrc/rep-cred:latest | |
test-container: | |
runs-on: ubuntu-latest | |
needs: build-container | |
container: | |
image: airrc/rep-cred:latest | |
strategy: | |
matrix: | |
TEST_DATA: [ | |
"test_repertoires/airr-covid-19.tsv", | |
"test_repertoires/1434_exp_RLQ_pos_beta.tsv" | |
] | |
FORMAT: [ | |
"html", | |
"pdf" | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run repcred command | |
run: | | |
repcred -r ${{ matrix.TEST_DATA }} -o outdir -d TRUE -f ${{ matrix.FORMAT }} |