name: Test
on:
  push:
    branches:
    - master
  pull_request:
jobs:
  test:
    runs-on: ${{ matrix.platform }}
    name: "${{ matrix.platform }} ${{ matrix.nodeversion }}"
    strategy:
      matrix:
        platform: [ubuntu-latest, macos-latest]
        nodeversion: ['16.x', '18.x', '19.x']
    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js v${{ matrix.nodeversion }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.nodeversion }}
      - name: Install dependencies
        run: yarn --frozen-lockfile
      - name: Install dependencies
        run: yarn build
      - name: test
        env:
          YARN_GPG: no 
        run: yarn test:mocha
