From 3db98d65dc4ee2735906eeabd4cbfb7aaed6fa5d Mon Sep 17 00:00:00 2001 From: JeanMarc van Leerdam Date: Fri, 5 Dec 2025 14:41:24 +0100 Subject: [PATCH 1/4] Set up a Github action that runs on push --- .github/workflows/gh-actions.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/gh-actions.yml diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml new file mode 100644 index 0000000..55abaaf --- /dev/null +++ b/.github/workflows/gh-actions.yml @@ -0,0 +1,22 @@ +name: gh-actions +run-name: ${{ github.actor }} triggered a Github Action +on: [push] +jobs: + sanity-checks: + env: + MC_TOKEN_USER: ${{ secrets.MAVEN_CENTRAL_TOKEN_USER }} + MC_TOKEN_PASS: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }} + SBT_VERSION: 1.11.4 + SBT_OPTS: "-Xms512M -Xmx1536M -Xss1M" + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Our environment + run: env | sort + - name: Organisation secrets + run: | + echo "MAVEN_CENTRAL_TOKEN_USER starts with ${MC_TOKEN_USER:0:1} and is ${#MC_TOKEN_USER} long" + echo "MAVEN_CENTRAL_TOKEN_PASSWORD starts with ${MC_TOKEN_PASSWORD:0:1} and is ${#MC_TOKEN_PASSWORD} long" + - name: Perform the tests + run: sbt clean test:compile scripted From f400afe04528db95f43e93e8524a37218db88935 Mon Sep 17 00:00:00 2001 From: JeanMarc van Leerdam Date: Fri, 5 Dec 2025 14:46:04 +0100 Subject: [PATCH 2/4] Fix typo and add java + sbt to the action --- .github/workflows/gh-actions.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml index 55abaaf..b60ac6c 100644 --- a/.github/workflows/gh-actions.yml +++ b/.github/workflows/gh-actions.yml @@ -12,11 +12,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 11 + - name: Setup sbt launcher + uses: sbt/setup-sbt@v1 - name: Our environment run: env | sort - name: Organisation secrets run: | echo "MAVEN_CENTRAL_TOKEN_USER starts with ${MC_TOKEN_USER:0:1} and is ${#MC_TOKEN_USER} long" - echo "MAVEN_CENTRAL_TOKEN_PASSWORD starts with ${MC_TOKEN_PASSWORD:0:1} and is ${#MC_TOKEN_PASSWORD} long" + echo "MAVEN_CENTRAL_TOKEN_PASSWORD starts with ${MC_TOKEN_PASS:0:1} and is ${#MC_TOKEN_PASS} long" - name: Perform the tests run: sbt clean test:compile scripted From be7a2b529ab949a30d05ad6b30f4cd0041ad08cd Mon Sep 17 00:00:00 2001 From: JeanMarc van Leerdam Date: Fri, 5 Dec 2025 15:00:20 +0100 Subject: [PATCH 3/4] Add cache to speed up subsequent runs --- .github/workflows/gh-actions.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml index b60ac6c..4044c1a 100644 --- a/.github/workflows/gh-actions.yml +++ b/.github/workflows/gh-actions.yml @@ -19,6 +19,13 @@ jobs: java-version: 11 - name: Setup sbt launcher uses: sbt/setup-sbt@v1 + - name: Cache SBT + uses: actions/cache@v4 + with: + path: | + ~/.ivy2/cache + ~/.sbt + key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} - name: Our environment run: env | sort - name: Organisation secrets From 76d169f3424911b426023c76befc8a4c400f4133 Mon Sep 17 00:00:00 2001 From: JeanMarc van Leerdam Date: Fri, 5 Dec 2025 15:02:24 +0100 Subject: [PATCH 4/4] Remove debug step --- .github/workflows/gh-actions.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml index 4044c1a..a9b7175 100644 --- a/.github/workflows/gh-actions.yml +++ b/.github/workflows/gh-actions.yml @@ -26,8 +26,6 @@ jobs: ~/.ivy2/cache ~/.sbt key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} - - name: Our environment - run: env | sort - name: Organisation secrets run: | echo "MAVEN_CENTRAL_TOKEN_USER starts with ${MC_TOKEN_USER:0:1} and is ${#MC_TOKEN_USER} long"