Skip to content

Commit

Permalink
tests: update ubuntu daily branch check
Browse files Browse the repository at this point in the history
  • Loading branch information
maykathm committed Jan 23, 2025
1 parent 6607975 commit b470abe
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,18 @@ jobs:
- name: check-branch-ubuntu-daily-spread
run: |
# Compare the daily system in master and in the current branch
wget -q -O test_master.yaml https://raw.githubusercontent.com/snapcore/snapd/master/.github/workflows/test.yaml
get_daily_system() {
file=$1
system_daily="$(yq '.jobs."spread-not-fundamental".strategy.matrix.include.[] | select(.group == "ubuntu-daily") | .systems' $file)"
if [ -z "$system_daily" ]; then
system_daily="$(yq '.jobs."spread-fundamental".strategy.matrix.include.[] | select(.group == "ubuntu-daily") | .systems' $file)"
fi
echo $system_daily
json1=$1
json2=$2
jq -s '{ include: [ .[0].include, .[1].include ] | add }' "$json1" "$json2" | \
jq '.include.[] | select(.group == "ubuntu-daily") | .systems'
}
master_daily="$(get_daily_system test_master.yaml)"
branch_daily="$(get_daily_system .github/workflows/test.yaml)"
wget -q -O master_fundsys.json https://raw.githubusercontent.com/snapcore/snapd/master/.github/workflows/fundamental-systems.json
wget -q -O master_nonfundsys.json https://raw.githubusercontent.com/snapcore/snapd/master/.github/workflows/non-fundamental-systems.json
master_daily="$(get_daily_system master_fundsys.json master_nonfundsys.json)"
branch_daily="$(get_daily_system .github/workflows/fundamental-systems.json .github/workflows/non-fundamental-systems.json)"
test "$master_daily" == "$branch_daily"
shell: bash

Expand Down

0 comments on commit b470abe

Please sign in to comment.