diff --git a/.github/workflows/health-checks.yml b/.github/workflows/health-checks.yml new file mode 100644 index 0000000000..d91815ebd4 --- /dev/null +++ b/.github/workflows/health-checks.yml @@ -0,0 +1,72 @@ +name: E2E Tests and Health Checks + +on: + schedule: + - cron: '*/30 * * * *' + workflow_dispatch: + inputs: + datil_branch: + description: 'Branch for Datil tests' + required: true + default: 'datil' + naga_branch: + description: 'Branch for Naga tests' + required: true + default: 'naga' + +env: + LIT_STATUS_WRITE_KEY: ${{ secrets.LIT_STATUS_WRITE_KEY }} + LIT_STATUS_BACKEND_URL: ${{ vars.LIT_STATUS_BACKEND_URL }} + +jobs: + datil-health-check: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + network: [datil-dev, datil-test, datil] + max-parallel: 1 + env: + PRIVATE_KEYS: ${{ secrets.PRIVATE_KEYS }} + steps: + - name: Checkout datil branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.datil_branch || 'datil' }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install Yarn dependencies + run: yarn install --frozen-lockfile + + - name: Run health check for ${{ matrix.network }} + run: NETWORK=${{ matrix.network }} yarn test:health + + naga-health-check: + runs-on: ubuntu-latest + needs: datil-health-check + strategy: + fail-fast: false + matrix: + network: [naga-dev, naga-staging, naga-test] + max-parallel: 1 + env: + LIVE_MASTER_ACCOUNT: ${{ secrets.LIVE_MASTER_ACCOUNT }} + LIT_YELLOWSTONE_PRIVATE_RPC_URL: ${{ vars.LIT_YELLOWSTONE_PRIVATE_RPC_URL }} + steps: + - name: Checkout naga branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.naga_branch || 'naga' }} + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + + - name: Install Bun dependencies + run: bun install --frozen-lockfile + + - name: Run health check for ${{ matrix.network }} + run: NETWORK=${{ matrix.network }} bun run test:health