Skip to content

setup command

setup command #81

Workflow file for this run

name: test
env:
GLEAM_VERSION: "1.1.0"
on:
push:
branches:
- main
pull_request:
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: 26
rebar3-version: 3
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: 26
rebar3-version: 3
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: 3
gleam-version: ${{env.GLEAM_VERSION}}
- run: gleam test --target erlang
test_node:
runs-on: ubuntu-latest
needs: deps
strategy:
fail-fast: true
matrix:
node: ["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: 26
gleam-version: ${{env.GLEAM_VERSION}}
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- run: gleam test --target javascript