Skip to content

use node20 (#372)

use node20 (#372) #655

Workflow file for this run

name: CI
on:
push:
branches-ignore: [ release ]
tags-ignore: [ v* ]
jobs:
# Builds the artifact and runs CI (unit test, linting).
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci # Install dependencies.
- run: npm run ci # Execute CI scripts.
- run: git diff --exit-code # Fail if CI scripts make any source changes.
# Runs integration tests (builds the artifact and runs it as an action).
test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: npm ci # Install dependencies.
- run: npm run build # Build javascript.
- run: npm run package # Build action package.
- name: integration test (1.5.1)
uses: ./
with:
version: 1.5.1
arguments: '--test $(pwd)/.github/workflows/ci/Good.scala'
- name: integration test (2.7.5)
uses: ./
with:
version: 2.7.5
arguments: '--list .github/workflows/ci/Good.scala'
- name: integration test (3.5.8)
uses: ./
with:
version: 3.5.8
arguments: '-c .github/workflows/ci/.scalafmt-v3.5.8.conf --list .github/workflows/ci/Good.scala'
- name: integration test (3.7.17)
uses: ./
with:
version: 3.7.17
arguments: '-c .github/workflows/ci/.scalafmt-v3.7.17.conf --list .github/workflows/ci/Good.scala'
# For any merge to main, also trigger a force push to the release branch.
# This creates a release candidate commit which can then be tagged and released.
# That commit on the release branch will not ever be merged back to main, and will be
# overwritten on the next merge to main. However, the tagged reference will remain accessible.
release:
if: github.ref == 'refs/heads/main'
needs: [ build, test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: configure git
run: |
git config --global user.name jrouly
git config --global user.email michel@rouly.net
- name: recreate release branch
run: |
git checkout release
git reset --hard main
- name: create release package
run: |
npm ci
npm run build
npm run package
- name: commit and push release package
run: |
git add -f lib dist
git commit -m "release package"
git push -f origin release