generated from microsoft/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: docker mount / feat: add docker build test (#41)
* fix: docker mount paths should by default point to the test data * add docker test and push * add docker test and push * add docker test and push
- Loading branch information
1 parent
962de78
commit 621ed36
Showing
2 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Docker Build and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Install Docker Compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
docker-compose --version | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and test Docker image | ||
run: docker-compose --env-file docker-compose.env up --build --exit-code-from sr2silo | ||
|
||
- name: Push to DockerHub | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
docker-compose push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
SAMPLE_DIR=../../../data/sr2silo/daemon_test/samples/A1_05_2024_10_08/20241024_2411515907/alignments/ | ||
SAMPLE_DIR=./tests/data/samples/A1_05_2024_10_08/20241024_2411515907/alignments | ||
SAMPLE_ID=A1_05_2024_10_08 | ||
BATCH_ID=20241024_2411515907 | ||
TIMELINE_FILE=../../../data/sr2silo/daemon_test/timeline.tsv | ||
TIMELINE_FILE=./tests/data/samples/timeline_A1_05_2024_10_08.tsv | ||
PRIMER_FILE=./tests/data/samples/primers.yaml | ||
NEXTCLADE_REFERENCE=sars-cov2 | ||
RESULTS_DIR=./results |