Skip to content

hack for input filename #44

hack for input filename

hack for input filename #44

Workflow file for this run

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@v3
- 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@v3
with:
name: "repcred-report_${{ env.ARTIFACT_NAME }}"
path: |
outdir/results
build:
runs-on: ubuntu-latest
needs: R-CMD-check
steps:
- name: Checkout
uses: actions/checkout@v3
- 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 }}
context: ./docker
file: ./docker/Dockerfile
- name: Build and export to Docker
uses: docker/build-push-action@v4
with:
context: ./docker
file: ./docker/Dockerfile
load: true
tags: rep-cred:test
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./docker
file: ./docker/Dockerfile
push: true
no-cache: true
tags: airrc/rep-cred:latest