From 1b86e37a909882a2dede42f083dfb6fdbaa80cf8 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 18 Aug 2024 02:53:03 -0700 Subject: [PATCH] ci: add test_repo script for more e2e testing --- .github/workflows/nightly.yml | 2 ++ .github/workflows/push.yml | 2 ++ test_repo.sh | 13 +++++++++++++ test_repo_all.sh | 5 +++++ 4 files changed, 22 insertions(+) create mode 100755 test_repo.sh create mode 100755 test_repo_all.sh diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1b50e9de3b7c8c5be88e5ea536775e6a18389627..a0be025a64a3d668fa1a680a3a3e5511f320f5b7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -36,3 +36,5 @@ jobs: - run: ./zig-out/bin/zigmod zpm add apple_pie - run: ./zig-out/bin/zigmod zpm tags - run: ./zig-out/bin/zigmod aq add 1/vrischmann/sqlite + + - run: ./test_repo.sh https://github.com/nektro/zigmod-test-basic diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 74ddb8259ada4d8b3a23334538c6d9da280e15bd..bcaaca05daf5def4aa47c56141e86a1e5cbd3b6e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -42,6 +42,8 @@ jobs: - run: ./zig-out/bin/zigmod zpm tags - run: ./zig-out/bin/zigmod aq add 1/vrischmann/sqlite + - run: ./test_repo.sh https://github.com/nektro/zigmod-test-basic + # Github Release - run: ./changelog.sh - run: ./make_release.sh ${{ secrets.GITHUB_TOKEN }} diff --git a/test_repo.sh b/test_repo.sh new file mode 100755 index 0000000000000000000000000000000000000000..672f221c6f95bf9acc2623f10ce8c15e4fcf6b33 --- /dev/null +++ b/test_repo.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +clone_url=$1 +clone_dir=$(mktemp -d) + +git clone $clone_url $clone_dir +cd $clone_dir + +zigmod fetch + +zig build test --summary all diff --git a/test_repo_all.sh b/test_repo_all.sh new file mode 100755 index 0000000000000000000000000000000000000000..2736f543974452db1336ebaf3135b7d0679cccb8 --- /dev/null +++ b/test_repo_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +./test_repo.sh https://github.com/nektro/zigmod-test-basic -- 2.54.0