e2e #4235
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |