diff --git a/.github/workflows/push-image.yml b/.github/workflows/push-image.yml index c1b616e..ced043f 100644 --- a/.github/workflows/push-image.yml +++ b/.github/workflows/push-image.yml @@ -8,7 +8,7 @@ on: - "*" jobs: - test: + build_and_push_image: runs-on: ubuntu-latest if: ${{ github.repository == 'codewars/riscv' }} permissions: diff --git a/Dockerfile b/Dockerfile index 6e9e293..0727eb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,5 +31,10 @@ RUN set -ex; \ useradd -m codewarrior; \ mkdir /workspace; \ chown -R codewarrior: /workspace; -USER codewarrior WORKDIR /workspace + +# TODO Maintain reporter in a separate repo +COPY workspace/codewars_reporter.c . +COPY workspace/tests.c . + +USER codewarrior diff --git a/bin/run b/bin/run index 20a6816..985812e 100755 --- a/bin/run +++ b/bin/run @@ -19,10 +19,5 @@ C=$($CONTAINER_ENGINE container create --rm -w $W $IMAGE_TAG sh -c "gcc -O2 solu # example/solution_tests.c $CONTAINER_ENGINE container cp examples/${1:-multiply}/. $C:$W -# Copy files common to all setups -# common/codewars_reporter.c -# common/tests.c -$CONTAINER_ENGINE container cp common/. $C:$W - # Run tests $CONTAINER_ENGINE container start --attach $C diff --git a/common/codewars_reporter.c b/workspace/codewars_reporter.c similarity index 100% rename from common/codewars_reporter.c rename to workspace/codewars_reporter.c diff --git a/common/tests.c b/workspace/tests.c similarity index 100% rename from common/tests.c rename to workspace/tests.c