name: Test Privacy Instances

on:
  push:
    branches:
      - main
  pull_request:
  schedule:
    - cron: "0 0 * * *"

jobs:
  test_instances:
    runs-on: ubuntu-latest

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

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
          cache-dependency-path: package-lock.json

      - name: Install dependencies
        run: npm install axios

      - name: Run testInstances.js
        run: node .github/workflows/testInstances.js
