Skip to content

Update npm deps

Update npm deps #2894

Workflow file for this run

name: Builds, tests & co
on:
pull_request:
push:
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
# Concurrent workflows are grouped by the PR or branch that triggered them
# (github.ref) and the name of the workflow (github.workflow). The
# 'cancel-in-progress' option then make sure that only one workflow is running
# at a time. This doesn't prevent new jobs from running, rather it cancels
# already running jobs before scheduling new jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'pull_request' || github.sha }}
cancel-in-progress: true
permissions: read-all
jobs:
hygiene:
name: Hygiene
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set-up Node.js 16
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: 16
- name: Get yarn cache folder path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >>"$GITHUB_OUTPUT"
- name: Retrieve yarn cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install npm packages
run: yarn install --immutable
- name: Check formatting
if: always()
run: yarn format:check
- name: Check lint
if: always()
run: yarn lint
- name: Check type
if: always()
run: yarn typecheck
- name: Ensure dist directory is up-to-date
shell: bash
run: |
yarn build
if [ "$(git status dist lint-doc lint-fmt lint-opam --porcelain | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
test:
name: Test
needs: hygiene
strategy:
fail-fast: false
matrix:
os:
- macos-13
- macos-12 # macos-latest
- ubuntu-latest
ocaml-compiler:
- "5.0"
include:
- os: windows-latest
ocaml-compiler: "4.14"
- os: ubuntu-latest
ocaml-compiler: ocaml-variants.5.0.0+options,ocaml-option-flambda,ocaml-option-musl,ocaml-option-static
- os: ubuntu-latest
ocaml-compiler: ocaml-variants.5.2.0+trunk
opam-repositories: |
beta: https://github.com/ocaml/ocaml-beta-repository.git
default: https://github.com/ocaml/opam-repository.git
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tree
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ./
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: ${{ matrix.opam-repositories }}
dune-cache: ${{ matrix.os != 'windows-latest' }}
- run: opam depext --install uri
- run: opam install ocamlbuild