name: Node CI

on:
    push:
        branches:
            - main

    pull_request:
        branches:
            - '*'

permissions:
    contents: read

jobs:
    build:
        strategy:
            matrix:
                platform: [ubuntu-latest]
                node-version: [18.15.0]
        runs-on: ${{ matrix.platform }}
        env:
            PUPPETEER_SKIP_DOWNLOAD: true
        steps:
            - uses: actions/checkout@v3
            - name: Use Node.js ${{ matrix.node-version }}
              uses: actions/setup-node@v3
              with:
                  node-version: ${{ matrix.node-version }}

            - run: npm i -g yarn

            - run: yarn install --ignore-engines

            - run: yarn lint

            - run: yarn build
