From 88ceb734d8c3d67167087455bc730935432db51f Mon Sep 17 00:00:00 2001 From: Paul Burns Date: Fri, 14 Jun 2024 14:38:55 -0400 Subject: [PATCH] Updates workflow and build script Updates workflow to use actions that use Node.js 20 Updates build script to fail the build on CI if stack attempts to write a new lock file. --- .github/workflows/main.yml | 2 +- scripts/test | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3395371e..32da4a19 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-version: v1 with: diff --git a/scripts/test b/scripts/test index b6c3b117..503ba339 100755 --- a/scripts/test +++ b/scripts/test @@ -4,8 +4,16 @@ set -e source scripts/lib/run-in-container.sh +STACK_OPTIONS="" + +if [ "$CI" ]; then + STACK_OPTIONS="--lock-file error-on-write" +else + STACK_OPTIONS="--fast" +fi + stack \ build \ --test \ - --fast \ + $STACK_OPTIONS \ "$@"