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