From 662f53f04045c1008901205781aa1e72101c4ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Bene=C5=A1?= Date: Mon, 9 Sep 2024 21:56:32 +0200 Subject: [PATCH] Move tests to autorelease.yml --- .github/workflows/autorelease.yml | 38 +++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 18 ++------------- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/.github/workflows/autorelease.yml b/.github/workflows/autorelease.yml index 6a919e772..ec5cac9f1 100644 --- a/.github/workflows/autorelease.yml +++ b/.github/workflows/autorelease.yml @@ -7,9 +7,47 @@ on: workflow_dispatch: # For manual triggering jobs: + run-tests: # redux of usual CI defined in `ci.yml` + name: Run tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: 'true' + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'zulu' + + - name: Set up NodeJS + uses: actions/setup-node@v4 + with: + node-version: '12.x' + + - name: Install MLton + run: | + curl -L https://github.com/MLton/mlton/releases/download/on-20210117-release/mlton-20210117-1.amd64-linux-glibc2.31.tgz --output mlton.tgz + tar -xzf mlton.tgz + mv mlton-20210117-1.amd64-linux-glibc2.31 $GITHUB_WORKSPACE/mlton + chmod +x $GITHUB_WORKSPACE/mlton/bin/mlton + echo "Trying to call directly" + $GITHUB_WORKSPACE/mlton/bin/mlton + echo "Adding mlton to path" + echo "$GITHUB_WORKSPACE/mlton/bin" >> $GITHUB_PATH + + - name: Install Chez Scheme, LLVM & libuv + run: sudo apt-get install -y chezscheme llvm-15 libuv1-dev + + - name: Run tests + run: sbt clean test + calculate-version-and-tag: name: Calculate Version and Create Tag runs-on: ubuntu-latest + needs: [run-tests] steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1e22f5127..e2cf2cedf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,7 @@ on: jobs: build-jar: - name: Build the Effekt compiler and run tests + name: Build and assemble the Effekt compiler runs-on: ubuntu-latest if: > (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || @@ -37,20 +37,6 @@ jobs: with: node-version: '12.x' - - name: Install MLton - run: | - curl -L https://github.com/MLton/mlton/releases/download/on-20210117-release/mlton-20210117-1.amd64-linux-glibc2.31.tgz --output mlton.tgz - tar -xzf mlton.tgz - mv mlton-20210117-1.amd64-linux-glibc2.31 $GITHUB_WORKSPACE/mlton - chmod +x $GITHUB_WORKSPACE/mlton/bin/mlton - echo "Trying to call directly" - $GITHUB_WORKSPACE/mlton/bin/mlton - echo "Adding mlton to path" - echo "$GITHUB_WORKSPACE/mlton/bin" >> $GITHUB_PATH - - - name: Install Chez Scheme - run: sudo apt-get install chezscheme - - name: Get the version id: get_version run: | @@ -66,7 +52,7 @@ jobs: exit 1 fi - - name: Run tests and assemble jar file + - name: Assemble jar file run: sbt clean deploy - name: Generate npm package