diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a29a2c..0cc6c5c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,27 +11,13 @@ defaults: jobs: test: - # TODO Switch to yamlscript-test-runner image - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest + container: ingy/exercism-yamlscript-test-runner:0.0.1 steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - run: sudo apt-get update - - run: sudo apt-get install -y apt-utils - - run: | - sudo apt-get install -y \ - curl \ - jq \ - make \ - perl \ - wget \ - xz-utils - - - name: Install dependencies - run: make deps - - name: Run checks and tests env: EXERCISM_YAMLSCRIPT_GHA: 1 diff --git a/Makefile b/Makefile index 64b934e..5486bab 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,17 @@ SHELL := bash ROOT := $(shell pwd) BIN := $(ROOT)/bin + YS := $(BIN)/ys CFGLET := $(BIN)/configlet SHELLCHECK := $(BIN)/shellcheck VERIFY := $(BIN)/verify-exercises +ifdef EXERCISM_YAMLSCRIPT_GHA +YS := ys +SHELLCHECK := shellcheck +endif + export PATH := $(BIN):$(PATH) EXERCISE_DIRS := $(shell find exercises -name .meta) @@ -128,6 +134,7 @@ realclean: clean $(RM) $(CFGLET) $(RM) $(SHELLCHECK) $(RM) $(BIN)/ys* + $(RM) -r $(CLOJURE_REPO) exercises/practice/%/Makefile: common/exercise.mk cp -p $< $@ @@ -143,6 +150,9 @@ $(YS): curl -s https://yamlscript.org/install | \ PREFIX=$(ROOT) BIN=1 bash +# Dummy rule for GHA +ys shellcheck: + $(CFGLET): $(BIN)/fetch-configlet @@ -158,7 +168,7 @@ $(SHELLCHECK_DIR): $(SHELLCHECK_TAR) tar xf $< $(SHELLCHECK_TAR): - wget $(SHELLCHECK_RELEASE) + wget --quiet $(SHELLCHECK_RELEASE) $(CLOJURE_REPO): git clone $(CLOJURE_REPO_URL) $@