name: CI
on: [push, pull_request]
env:
  FORCE_COLOR: true
jobs:
  ci:
    name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node_version: [18]
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
    - uses: actions/checkout@v3
    - name: Use node ${{ matrix.node_version }}
      uses: actions/setup-node@v2-beta
      with:
        node-version: ${{ matrix.node_version }}
        check-latest: true
    - name: Restore cache
      uses: actions/cache@v3
      with:
        path: |
          node_modules
        key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
    - name: Install yarn dependencies
      run: yarn install
    - name: Test package
      run: yarn test
