@@ -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
+ steps :
63
+ - name : Create pending status
64
+ uses : actions/github-script@v7
65
+ with :
66
+ github-token : ${{ secrets.GITHUB_TOKEN }}
67
+ script : |
68
+ github.repos.createStatus({
69
+ owner: context.repo.owner,
70
+ repo: context.repo.repo,
71
+ sha: context.payload.client_payload.pull_request.head.sha,
72
+ state: 'pending',
73
+ target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
74
+ context: 'CI - Windows',
75
+ })
76
+ - uses : actions/checkout@v4
77
+ with :
78
+ token : ${{ secrets.GITHUB_TOKEN }}
79
+ repository : ${{ github.event.client_payload.pull_request.head.repo.full_name }}
80
+ ref : ${{ github.event.client_payload.pull_request.head.ref }}
81
+ - name : Build with Gradle
82
+ run : ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
83
+ - uses : ./.github/actions/setup-junit-report
84
+
85
+ - name : Create success status
86
+ uses : actions/github-script@v7
87
+ if : success()
88
+ with :
89
+ github-token : ${{ secrets.GITHUB_TOKEN }}
90
+ script : |
91
+ github.repos.createStatus({
92
+ owner: context.repo.owner,
93
+ repo: context.repo.repo,
94
+ sha: context.payload.client_payload.pull_request.head.sha,
95
+ state: 'success',
96
+ target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
97
+ context: 'CI - Windows',
98
+ })
99
+
100
+ - name : Create failure status
101
+ uses : actions/github-script@v7
102
+ if : failure()
103
+ with :
104
+ github-token : ${{ secrets.GITHUB_TOKEN }}
105
+ script : |
106
+ github.repos.createStatus({
107
+ owner: context.repo.owner,
108
+ repo: context.repo.repo,
109
+ sha: context.payload.client_payload.pull_request.head.sha,
110
+ state: 'failure',
111
+ target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
112
+ context: 'CI - Windows',
113
+ })
0 commit comments