@@ -43,8 +43,8 @@ permissions:
43
43
contents : read
44
44
45
45
jobs :
46
- core :
47
- if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event.client_payload.slash_command.command == 'windows-test ' }}
46
+ main :
47
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
48
48
runs-on : self-hosted
49
49
permissions :
50
50
checks : write
53
53
- name : Build with Gradle
54
54
run : ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
55
55
- uses : ./.github/actions/setup-junit-report
56
+
57
+ pr :
58
+ if : ${{ github.event.client_payload.slash_command.command == 'windows-test' }}
59
+ runs-on : self-hosted
60
+ permissions :
61
+ checks : write
62
+ statuses : write
63
+ steps :
64
+ - name : Create pending status
65
+ uses : actions/github-script@v7
66
+ with :
67
+ github-token : ${{ secrets.GITHUB_TOKEN }}
68
+ script : |
69
+ github.rest.repos.createCommitStatus({
70
+ owner: context.repo.owner,
71
+ repo: context.repo.repo,
72
+ sha: context.payload.client_payload.pull_request.head.sha,
73
+ state: 'pending',
74
+ target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
75
+ context: 'CI - Windows',
76
+ })
77
+ - uses : actions/checkout@v4
78
+ with :
79
+ token : ${{ secrets.GITHUB_TOKEN }}
80
+ repository : ${{ github.event.client_payload.pull_request.head.repo.full_name }}
81
+ ref : ${{ github.event.client_payload.pull_request.head.ref }}
82
+ - name : Build with Gradle
83
+ run : ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
84
+ - uses : ./.github/actions/setup-junit-report
85
+
86
+ - name : Create success status
87
+ uses : actions/github-script@v7
88
+ if : success()
89
+ with :
90
+ github-token : ${{ secrets.GITHUB_TOKEN }}
91
+ script : |
92
+ github.rest.repos.createCommitStatus({
93
+ owner: context.repo.owner,
94
+ repo: context.repo.repo,
95
+ sha: context.payload.client_payload.pull_request.head.sha,
96
+ state: 'success',
97
+ target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
98
+ context: 'CI - Windows',
99
+ })
100
+
101
+ - name : Create failure status
102
+ uses : actions/github-script@v7
103
+ if : failure()
104
+ with :
105
+ github-token : ${{ secrets.GITHUB_TOKEN }}
106
+ script : |
107
+ github.rest.repos.createCommitStatus({
108
+ owner: context.repo.owner,
109
+ repo: context.repo.repo,
110
+ sha: context.payload.client_payload.pull_request.head.sha,
111
+ state: 'failure',
112
+ target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
113
+ context: 'CI - Windows',
114
+ })
0 commit comments