-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
name: Snapshot Test | ||
|
||
"on": | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
setup-go-and-snapshot: | ||
name: Setup Go and Create Snapshot | ||
runs-on: warp-ubuntu-2204-x64-2x | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download go.sum | ||
run: | | ||
set -x | ||
wget --no-verbose https://raw.githubusercontent.com/packwiz/packwiz/refs/heads/main/go.sum | ||
echo $PATH | ||
- name: Setup Go | ||
uses: WarpBuilds/setup-go@v5 | ||
with: | ||
go-version: "1.23.3" | ||
|
||
- name: Install and verify | ||
run: | | ||
set -x | ||
go install github.com/packwiz/packwiz@latest | ||
echo $PATH | ||
packwiz | ||
- name: Create snapshot | ||
uses: WarpBuilds/snapshot-save@v1 | ||
with: | ||
alias: "go-setup-${{ github.run_id }}" | ||
fail-on-error: true | ||
wait-timeout-minutes: 60 | ||
|
||
run-from-snapshot: | ||
name: Verify Snapshot | ||
runs-on: warp-ubuntu-2204-x64-2x;snapshot.key=go-setup-${{ github.run_id }} | ||
needs: setup-go-and-snapshot | ||
steps: | ||
- name: Verify | ||
run: | | ||
set -x | ||
echo $PATH | ||
packwiz | ||
run-from-snapshot-go: | ||
name: Verify Snapshot with Go Setup | ||
runs-on: warp-ubuntu-2204-x64-2x;snapshot.key=go-setup-${{ github.run_id }} | ||
needs: setup-go-and-snapshot | ||
steps: | ||
- name: Setup Go | ||
uses: WarpBuilds/setup-go@v5 | ||
with: | ||
go-version: "1.23.3" | ||
|
||
- name: Verify | ||
run: | | ||
set -x | ||
echo $PATH | ||
packwiz | ||
run-from-snapshot-path: | ||
name: Verify Snapshot with PATH | ||
runs-on: warp-ubuntu-2204-x64-2x;snapshot.key=go-setup-${{ github.run_id }} | ||
needs: setup-go-and-snapshot | ||
steps: | ||
- name: Set PATH and verify | ||
run: | ||
set -x | ||
echo $PATH | ||
export PATH="/home/runner/go/bin:/opt/hostedtoolcache/go/1.23.3/x64/bin:${PATH}" | ||
echo $PATH | ||
packwiz |