name: Tests

on:
  push:
    branches:
      - development
      - master
  pull_request:
    branches:
      - "**"

env:
  FORCE_COLOR: 2

jobs:
  run:
    name: Node
    runs-on: ubuntu-latest

    steps:
      - name: Clone repository
        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
        with:
          persist-credentials: false

      - name: Set up Node.js
        uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0
        with:
          node-version: "22.x"
          cache: npm

      - name: Install npm dependencies
        run: npm ci

      - name: Run tests
        run: npm run testpr
