JS support #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Node.js CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
OPT_VER: "26.0.2" | |
GLEAM_VER: "1.2.0" | |
REBAR_VER: "3" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "$OPT_VER" | |
gleam-version: "$GLEAM_VER" | |
rebar3-version: "$REBAR_VER" | |
- run: gleam deps download | |
- run: gleam test | |
- run: gleam format --check src test | |
erlang: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "$OPT_VER" | |
gleam-version: "$GLEAM_VER" | |
rebar3-version: "$REBAR_VER" | |
- run: gleam run | |
node: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "$OPT_VER" | |
gleam-version: "$GLEAM_VER" | |
rebar3-version: "$REBAR_VER" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- run: npm i | |
- run: gleam run --target javascript --runtime nodejs | |
bun: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "$OPT_VER" | |
gleam-version: "$GLEAM_VER" | |
rebar3-version: "$REBAR_VER" | |
- uses: oven-sh/setup-bun@v1 | |
- run: bun install | |
- run: gleam run --target javascript --runtime bun |