Skip to content

Commit

Permalink
Backport: Move tests to autorelease.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jiribenes committed Sep 9, 2024
1 parent 6a08574 commit 93e124c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/autorelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')) ||
Expand All @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit 93e124c

Please sign in to comment.