Skip to content

Commit

Permalink
Change GHA workflow to use pre-built Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Jul 29, 2024
1 parent 3dfb992 commit 684e643
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 $< $@
Expand All @@ -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

Expand All @@ -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) $@

0 comments on commit 684e643

Please sign in to comment.