end-to-end/actions/example-matrix-dynamic/run.sh
Mathieu Fenniak 4622f0fe78 test: add Actions dynamic matrix end-to-end test (#1261)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/1261
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-12-01 18:59:50 +00:00

10 lines
609 B
Bash

forgejo-test-helper.sh run_workflow actions/example-$example $url root example-$example setup-forgejo $token
# Verify that the matrix in the job was expanded correctly by checking that
# there are 9 completed jobs, by their commit statuses being present on the
# main branch's HEAD.
api=$url/api/v1
sha=$(forgejo-curl.sh api_json $api/repos/root/example-matrix-dynamic/branches/main | jq -r ".commit.id")
num_runs=$(forgejo-curl.sh api_json $api/repos/root/example-matrix-dynamic/commits/$sha/status | jq ".total_count")
echo "Expecting 9 commit statuses, found $num_runs commit statuses"
test $num_runs = 9