name: Build check

on:
  schedule:
    # build runs every weekday at 3AM UTC
    - cron: '0 3 * * 1-5'

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [18.x]
        os: [ubuntu-latest, windows-latest, macOS-latest]

    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
      - name: project check
        run: |
          npm i
          npm run build:icons:prod
          npm run build:lib:prod
          npm run lint:lib
          npm run test:lib:prod
        env:
          CI: true
