Skip to content

add version check to release workflow #126

add version check to release workflow

add version check to release workflow #126

Workflow file for this run

name: Test
env:
GLEAM_VERSION: "1.1.0"
ERLANG_VERSION: 26
REBAR3_VERSION: 3
on:
push:
branches:
- main
pull_request:
workflow_call:
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.ERLANG_VERSION }}
rebar3-version: ${{ env.REBAR3_VERSION }}
gleam-version: ${{ env.GLEAM_VERSION }}
- run: gleam format --check src test
deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check cache
uses: actions/cache/restore@v4
id: restore
with:
path: ./build/packages
key: deps-${{ hashFiles('manifest.toml') }}
- if: ${{ steps.restore.outputs.cache-hit != 'true' }}
uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.ERLANG_VERSION }}
rebar3-version: ${{ env.REBAR3_VERSION }}
gleam-version: ${{ env.GLEAM_VERSION }}
- if: ${{ steps.restore.outputs.cache-hit != 'true' }}
run: gleam deps download
- if: ${{ steps.restore.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: ./build/packages
key: deps-${{ hashFiles('manifest.toml') }}
test_erlang:
runs-on: ubuntu-latest
needs: deps
strategy:
fail-fast: true
matrix:
erlang: ["26", "25", "27.0-rc3"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ./build/packages
key: deps-${{ hashFiles('manifest.toml') }}
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.erlang}}
rebar3-version: ${{ env.REBAR3_VERSION }}
gleam-version: ${{env.GLEAM_VERSION}}
- run: gleam test --target erlang
test_node:
runs-on: ubuntu-latest
needs: deps
strategy:
fail-fast: true
matrix:
node: ["22", "20", "18"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ./build/packages
key: deps-${{ hashFiles('manifest.toml') }}
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.ERLANG_VERSION }}
gleam-version: ${{env.GLEAM_VERSION}}
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- run: gleam test --target javascript