Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[draft] tests: debug/update validation sets spread test #5074

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/cla-check.yaml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/publish.yaml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/spread-scheduled.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/spread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,6 @@ jobs:
run: |
sudo snap install --dangerous --classic ${{ steps.build-snapcraft.outputs.snap }}

integration-spread-tests:
runs-on: [spread-installed]
needs: build
strategy:
# FIXME: enable fail-fast mode once spread can cancel an executing job.
# Disable fail-fast mode as it doesn't function with spread. It seems
# that cancelling tasks requires short, interruptible actions and
# interrupting spread, notably, does not work today. As such disable
# fail-fast while we tackle that problem upstream.
fail-fast: false
matrix:
spread-jobs:
- google:ubuntu-20.04-64
- google:ubuntu-22.04-64
- google:ubuntu-24.04-64

steps:
- name: Checkout snapcraft
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Download snapcraft snap
uses: actions/download-artifact@v4
with:
name: snap
path: tests

- name: Run spread
env:
SPREAD_GOOGLE_KEY: ${{ secrets.SPREAD_GOOGLE_KEY }}
UA_TOKEN: ${{ secrets.UA_TOKEN }}
run: spread ${{ matrix.spread-jobs }}

- name: Discard spread workers
if: always()
run: |
shopt -s nullglob
for r in .spread-reuse.*.yaml; do
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')"
done

integration-spread-tests-store:
runs-on: [spread-installed]
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/tics.yaml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/tox.yaml

This file was deleted.

19 changes: 12 additions & 7 deletions tests/spread/store/validation-sets/editor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

validation_set_file="$1"

# flip-flop between two valid revisions of `test-snapcraft-assertions` in the staging store: 1 and 2
if grep -q "^ revision:.*1" "$validation_set_file"; then
(( revision=2 ))
else
(( revision=1 ))
fi
cat "$validation_set_file"

sed -i "s/ revision:.*/ revision: $revision/g" "$validation_set_file"
cat << EOF > $validation_set_file
account-id: pv8nW1ZaULF7xXAkE3tiU3TdlOnYlGUr
name: testset
sequence: 1
# The revision for this validation set
# revision: 61
snaps:
- id: JtwEnisYi8Mmk51vNLZPSOwSOFLwGdhs
name: hello-world
presence: required
EOF
2 changes: 2 additions & 0 deletions tests/spread/store/validation-sets/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ execute: |

snapcraft list-validation-sets | MATCH testset

exit 1

restore: |
rm -rf "$HOME/.snap/gnupg"

Expand Down
Loading