Skip to content

e2e

e2e #5258

Workflow file for this run

name: e2e
on:
workflow_dispatch:
inputs:
api_base:
type: string
default: https://dota.haglund.dev
required: false
description: "The base URL of the API to test"
schedule:
- cron: "0 */4 * * *" # https://crontab.guru/#0_*/4_*_*_*
env:
API_BASE: ${{ inputs.api_base || 'https://dota.haglund.dev' }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: corepack enable
- name: find pnpm cache path
id: cache
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.cache.outputs.path }}
key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
v1-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm test:e2e run
- name: Create issue!
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh issue create --title "E2E test(s) failed!" --body "This is an automated issue to notify @BeeeQueue that the e2e tests failed - https://github.com/BeeeQueue/dota-matches-api/actions/runs/${{ github.run_id }}"