Skip to content

Commit 28a764c

Browse files
committed
fix(tests): use explicit variable to skip tests
1 parent 8046d10 commit 28a764c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/docker-image-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,5 @@ jobs:
8686
push: true
8787
tags: ${{ steps.meta.outputs.tags }}
8888
labels: ${{ steps.meta.outputs.labels }}
89+
build-args: |
90+
SKIP_TESTS=true

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
FROM noelmni/antspynet:master-58b19c9-mamba AS builder
22
LABEL maintainer=<ravnoor@gmail.com>
33

4+
# set variable for conditional test execution
5+
ARG SKIP_TESTS=false
6+
47
USER root
58

69
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.docker.yml environment.yml
@@ -15,9 +18,8 @@ COPY . .
1518
ARG MAMBA_DOCKERFILE_ACTIVATE=1
1619
RUN pip install --no-deps dist/*.whl
1720

18-
# run tests
19-
RUN echo ${TARGETPLATFORM}
20-
RUN if [ "$CI" != "true" ] && [ "${TARGETPLATFORM}" != "linux/arm64" ]; then bash tests/run_tests.sh; fi
21+
# run tests if SKIP_TESTS is not true
22+
RUN if [ "${SKIP_TESTS}" != "true" ]; then bash tests/run_tests.sh; fi
2123

2224
# production image
2325
FROM mambaorg/micromamba:2-debian12-slim

0 commit comments

Comments
 (0)