Skip to content

Commit 72caf52

Browse files
workflows: run a test via job-runner
...and report the status against the same PR. This gives us something like a partial real-world test against real GitHub.
1 parent ced40d8 commit 72caf52

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/test.yml

+24
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@ jobs:
1919
- name: Run test
2020
run: test/run
2121

22+
job-runner:
23+
runs-on: ubuntu-22.04
24+
permissions:
25+
pull-requests: read
26+
statuses: write
27+
steps:
28+
- name: Clone repository
29+
uses: actions/checkout@v4
30+
31+
- name: Create job-runner config
32+
run: echo "forge.github.token = '${{ secrets.GITHUB_TOKEN }}'" > override.toml
33+
34+
- name: Run job-runner on this PR
35+
run: |
36+
./job-runner \
37+
-F override.toml \
38+
run \
39+
'${{ github.repository }}' \
40+
--pull '${{ github.event.number }}' \
41+
--context 'job-runner/test'
42+
43+
- name: Show the logs
44+
run: find ~/.cache/cockpit-dev/job-runner-logs -type f -name log -exec head -vn-0 {} +
45+
2246
cockpituous:
2347
runs-on: ubuntu-22.04
2448
permissions:

0 commit comments

Comments
 (0)