name: tests

on:
  push:
    branches:
      - master
      - '*.x'
  pull_request:
  schedule:
    - cron: '0 0 * * *'

jobs:
  tests:
    runs-on: ubuntu-20.04

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install dependencies
        run: npm install

      - name: ESLint
        run: npm run lint

      - name: Execute tests
        run: npm test

      - name: Run build
        run: npm run build
