name: Hyas CI

on:
  push:
    branches: master
  pull_request:
    branches: master

jobs:
  build:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        node: [16.x, 18.x]

    steps:
    - name: Check out Hyas project
      uses: actions/checkout@v2

    - name: Set up Node.js ${{ matrix.node }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node }}

    - name: Install dependencies
      run: npm ci

    - name: Run Hyas test script
      run: npm test

    - name: Build production website
      run: npm run build