mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Switch the tests-done
job to an Action (#12161)
I've factored it out for easier use in other workflows.
This commit is contained in:
parent
00a67f831a
commit
0211f18d65
28
.github/workflows/tests.yml
vendored
28
.github/workflows/tests.yml
vendored
@ -388,34 +388,22 @@ jobs:
|
|||||||
tests-done:
|
tests-done:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
needs:
|
needs:
|
||||||
|
- check-sampleconfig
|
||||||
- lint
|
- lint
|
||||||
- lint-crlf
|
- lint-crlf
|
||||||
- lint-newsfile
|
- lint-newsfile
|
||||||
- trial
|
- trial
|
||||||
- trial-olddeps
|
- trial-olddeps
|
||||||
- sytest
|
- sytest
|
||||||
|
- export-data
|
||||||
- portdb
|
- portdb
|
||||||
- complement
|
- complement
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set build result
|
- uses: matrix-org/done-action@v2
|
||||||
env:
|
with:
|
||||||
NEEDS_CONTEXT: ${{ toJSON(needs) }}
|
needs: ${{ toJSON(needs) }}
|
||||||
# the `jq` incantation dumps out a series of "<job> <result>" lines.
|
|
||||||
# we set it to an intermediate variable to avoid a pipe, which makes it
|
|
||||||
# hard to set $rc.
|
|
||||||
run: |
|
|
||||||
rc=0
|
|
||||||
results=$(jq -r 'to_entries[] | [.key,.value.result] | join(" ")' <<< $NEEDS_CONTEXT)
|
|
||||||
while read job result ; do
|
|
||||||
# The newsfile lint may be skipped on non PR builds
|
|
||||||
if [ $result == "skipped" ] && [ $job == "lint-newsfile" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$result" != "success" ]; then
|
# The newsfile lint may be skipped on non PR builds
|
||||||
echo "::set-failed ::Job $job returned $result"
|
skippable:
|
||||||
rc=1
|
lint-newsfile
|
||||||
fi
|
|
||||||
done <<< $results
|
|
||||||
exit $rc
|
|
||||||
|
1
changelog.d/12161.misc
Normal file
1
changelog.d/12161.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Use a prebuilt Action for the `tests-done` CI job.
|
Loading…
Reference in New Issue
Block a user