Skip to content
Snippets Groups Projects
Unverified Commit 0211f18d authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Switch the `tests-done` job to an Action (#12161)

I've factored it out for easier use in other workflows.
parent 00a67f83
No related branches found
No related tags found
No related merge requests found
...@@ -388,34 +388,22 @@ jobs: ...@@ -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 # The newsfile lint may be skipped on non PR builds
# hard to set $rc. skippable:
run: | lint-newsfile
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
echo "::set-failed ::Job $job returned $result"
rc=1
fi
done <<< $results
exit $rc
Use a prebuilt Action for the `tests-done` CI job.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment