-
-
Notifications
You must be signed in to change notification settings - Fork 29
76 lines (67 loc) · 1.81 KB
/
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
name: Build and Test
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
on:
pull_request:
env:
DOCKER_BUILDKIT: 1
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
require-label:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
outputs:
status: ${{ steps.check-labels.outputs.status }}
steps:
- uses: mheap/github-action-required-labels@v3
id: check-labels
with:
mode: exactly
count: 1
labels: "bug, feature, engineering, security fix, testing"
- uses: mheap/github-action-required-labels@v3
with:
mode: exactly
count: 0
labels: "do not merge"
unit-tests:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
-
uses: actions/checkout@v3
-
name: Unit Tests
run: make unit-tests-ci
-
name: Publish Test Results
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v2
if: always()
with:
check_name: Unit Test Results
github_token: ${{ github.token }}
junit_files: PhpUnitTests.xml
e2e-tests:
uses: ./.github/workflows/e2e-tests.yml
check-code-formatting:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
-
uses: pnpm/action-setup@v4
-
uses: actions/setup-node@v4
with:
node-version: "22.2.0"
cache: "pnpm"
-
name: Run prettier check
run: |
pnpm dlx prettier -v
pnpm dlx prettier --check .