-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.82 KB
/
e2e.yaml
File metadata and controls
63 lines (54 loc) · 1.82 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
name: E2E (self-dogfood)
on:
issue_comment:
types: [created, edited]
discussion_comment:
types: [created, edited]
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
permissions:
contents: read
concurrency:
group: e2e-${{ github.event.comment.id || github.ref }}
cancel-in-progress: false
jobs:
registered:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- run: echo "E2E workflow is registered. Real dogfood runs only on issue_comment / discussion_comment."
dogfood:
if: |
(github.event_name == 'issue_comment' || github.event_name == 'discussion_comment') &&
startsWith(github.event.comment.body, '.')
runs-on: ubuntu-latest
environment: e2e
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup
- run: pnpm build
- id: command
uses: ./
continue-on-error: true
with:
command: test
allowed_contexts: issue,pull_request,discussion
- name: Verify
env:
ACTUAL_OUTCOME: ${{ steps.command.outcome }}
ACTUAL_CONTINUE: ${{ steps.command.outputs.continue }}
ACTUAL_COMMAND: ${{ steps.command.outputs.command }}
ACTUAL_PARAMS: ${{ steps.command.outputs.params }}
ACTUAL_NUMBER: ${{ steps.command.outputs.number }}
ACTUAL_CONTEXT: ${{ steps.command.outputs.context }}
ACTUAL_ISSUE_NUMBER: ${{ steps.command.outputs.issue_number }}
ACTUAL_COMMENT_ID: ${{ steps.command.outputs.comment_id }}
ACTUAL_ACTOR: ${{ steps.command.outputs.actor }}
run: pnpm tsx scripts/e2e-verify.ts