fix(ci): handle missing go.sum gracefully

This commit is contained in:
benzjeremy 2026-09-17 09:40:39 +02:00
parent a1c87f8539
commit b0bd48cf88

View File

@ -11,12 +11,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: archlinux:latest image: archlinux:latest
env:
CGO_ENABLED: "0"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install dependencies - name: Install dependencies
run: | run: |
pacman -Sy --noconfirm git base-devel go \ pacman -Sy --noconfirm git base-devel go
gtk3 webkit2gtk
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
@ -24,7 +25,11 @@ jobs:
- name: Verify go.mod tidy - name: Verify go.mod tidy
run: | run: |
go mod tidy go mod tidy
git diff --exit-code go.mod go.sum if [ -f go.sum ]; then
git diff --exit-code go.mod go.sum
else
git diff --exit-code go.mod
fi
- name: Build - name: Build
run: go build ./... run: go build ./...
- name: Test - name: Test