Skip to content

Stricter path types for stricter path-related logic #1689

Stricter path types for stricter path-related logic

Stricter path types for stricter path-related logic #1689

Workflow file for this run

name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
container: ${{ matrix.image }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macOS-latest
- os: windows-latest
steps:
# We set LF endings so that the Windows environment is consistent with the rest
# See here for context: https://github.com/actions/checkout/issues/135
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.longpaths true
- uses: actions/checkout@v4
# NB: We install gnu-tar because BSD tar is buggy on Github's macos machines,
# and it breaks the cache: https://github.com/actions/cache/issues/403
- name: Install GNU tar (macOS)
if: runner.os == 'macOS'
run: |
brew install gnu-tar
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
- name: Setup node and npm
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache NPM dependencies
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install global NPM packages
run: npm i --global [email protected] spago@next purs-tidy@latest esbuild@latest
- name: Cache PureScript dependencies
uses: actions/cache@v4
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }}
path: |
.spago
output
- name: Install NPM dependencies
run: npm ci
- name: Install PureScript dependencies
run: spago install
- name: Build the project
run: spago build
- name: Bootstrap executable
run: node ./bin/index.dev.js bundle -p spago-bin
- name: Bundle docs-search client
run: node ./bin/bundle.js bundle -p docs-search-client-halogen
- name: Run tests
run: node ./bin/bundle.js test
- name: Check formatting (Linux only)
if: matrix.os == 'ubuntu-latest'
run: npm run format:check