-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (39 loc) · 1.29 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 }}"