Skip to content

Commit

Permalink
ci: attempt test with new docker matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Nov 24, 2023
1 parent 74988a1 commit 6510f03
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
IMAGE_NAME: ${{ github.repository }}
DOCKER_IMAGE: "ghcr.io/${{ github.repository }}:${{ github.refname }}"

jobs:

Expand Down Expand Up @@ -50,23 +50,15 @@ jobs:
- arch: docker
os: ubuntu-latest
binary: rebar
prefix: "docker run "
prefix: "docker run ${{ env.DOCKER_IMAGE }} "

runs-on: ${{ matrix.os }}

steps:
- name: checkout repo
uses: actions/checkout@v3

- name: download binary from build
if: ${{ matrix.arch != docker }}
uses: actions/download-artifact@v3
with:
name: rebar-${{ matrix.arch }}
path: target/${{ matrix.arch }}/release

- name: download docker image from build
if: ${{ matrix.arch == docker }}
- name: download build output
uses: actions/download-artifact@v3
with:
name: rebar-${{ matrix.arch }}
Expand All @@ -82,30 +74,30 @@ jobs:
- name: load docker image
if: ${{ matrix.arch == docker }}
run: |
docker load target/${{ matrix.arch }}/release/${{ matrix.binary }}.tar
docker load --input ${{ env.DOCKER_IMAGE }}
- name: dataset list
run: |
./${{ matrix.binary }} dataset list
${{ matrix.prefix }}${{ matrix.binary }} dataset list
- name: dataset download
run: |
./${{ matrix.binary }} dataset download --name sars-cov-2 --tag 2023-11-17 --output-dir dataset/sars-cov-2/2023-11-17
${{ matrix.prefix }}${{ matrix.binary }} dataset download --name sars-cov-2 --tag 2023-11-17 --output-dir dataset/sars-cov-2/2023-11-17
- name: example 1
run: |
./${{ matrix.binary }} run --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example1 --populations "AY.4.2*,BA.5.2,XBC.1.6*,XBB.1.5.1,XBL"
./${{ matrix.binary }} plot --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example1
${{ matrix.prefix }}${{ matrix.binary }} run --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example1 --populations "AY.4.2*,BA.5.2,XBC.1.6*,XBB.1.5.1,XBL"
${{ matrix.prefix }}${{ matrix.binary }} plot --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example1
- name: example 2
run: |
./${{ matrix.binary }} run --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example2 --alignment data/example2.fasta
./${{ matrix.binary }} plot --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example2
${{ matrix.prefix }}${{ matrix.binary }} run --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example2 --alignment data/example2.fasta
${{ matrix.prefix }}${{ matrix.binary }} plot --dataset-dir dataset/sars-cov-2/2023-11-17 --output-dir output/example2
- name: toy1
run: |
./${{ matrix.binary }} run --dataset-dir dataset/toy1 --output-dir output/toy1 --populations "*" --mask 0,0 --min-length 1
./${{ matrix.binary }} plot --dataset-dir dataset/toy1 --output-dir output/toy1
${{ matrix.prefix }}${{ matrix.binary }} run --dataset-dir dataset/toy1 --output-dir output/toy1 --populations "*" --mask 0,0 --min-length 1
${{ matrix.prefix }}${{ matrix.binary }} plot --dataset-dir dataset/toy1 --output-dir output/toy1
- name: upload output
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 6510f03

Please sign in to comment.