-
Notifications
You must be signed in to change notification settings - Fork 92
80 lines (68 loc) · 2.57 KB
/
test-pull-request.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: "Test: PR"
on:
workflow_dispatch:
pull_request:
branches:
- main
- 'prerelease/**'
jobs:
pr-tags:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.pr-tags.outputs.tags }}
steps:
- uses: actions/checkout@v4
- uses: 8BitJonny/[email protected]
id: PR
- run: echo "PR ${prNumber} ${prTitle} at ${prUrl} is ${prJSON}"
if: steps.PR.outputs.pr_found == 'true'
env:
# JSON object with the full PR object
# toJSON(fromJSON(...pr)) parses it into memory and then format is with pretty-print.
prJSON: ${{ toJSON(fromJSON(steps.PR.outputs.pr)) }}
# Direct access to common PR properties
prNumber: ${{ steps.PR.outputs.number }}
prUrl: ${{ steps.PR.outputs.pr_url }}
prTitle: ${{ steps.PR.outputs.pr_title }}
prBody: ${{ steps.PR.outputs.pr_body }}
prCreatedAt: ${{ steps.PR.outputs.pr_created_at }}
prMergedAt: ${{ steps.PR.outputs.pr_merged_at }}
prClosedAt: ${{ steps.PR.outputs.pr_closed_at }}
prLabel: ${{ steps.PR.outputs.pr_labels }}
- run: echo "${prBody}"
if: steps.PR.outputs.pr_found == 'true'
env:
# JSON object with the full PR object
# toJSON(fromJSON(...pr)) parses it into memory and then format is with pretty-print.
prJSON: ${{ toJSON(fromJSON(steps.PR.outputs.pr)) }}
# Direct access to common PR properties
prNumber: ${{ steps.PR.outputs.number }}
prUrl: ${{ steps.PR.outputs.pr_url }}
prTitle: ${{ steps.PR.outputs.pr_title }}
prBody: ${{ steps.PR.outputs.pr_body }}
prCreatedAt: ${{ steps.PR.outputs.pr_created_at }}
prMergedAt: ${{ steps.PR.outputs.pr_merged_at }}
prClosedAt: ${{ steps.PR.outputs.pr_closed_at }}
prLabel: ${{ steps.PR.outputs.pr_labels }}
- name: Parse Tags from PR Body
id: pr-tags
run: bash scripts/pr-tags-parse.sh "${{ github.event_path }}"
env:
prBody: ${{ steps.PR.outputs.pr_body }}
e2e-electron:
name: e2e
uses: ./.github/workflows/test-e2e-linux.yml
needs: pr-tags
with:
grep: ${{ needs.pr-tags.outputs.tags }}
display_name: "electron (linux)"
currents_tags: "pull-request,electron/linux,${{ needs.pr-tags.outputs.tags }}"
secrets: inherit
unit-tests:
name: test
uses: ./.github/workflows/test-unit.yml
secrets: inherit
integration-tests:
name: test
uses: ./.github/workflows/test-integration.yml
secrets: inherit