Skip to content

Commit

Permalink
Improve godemo dep handling
Browse files Browse the repository at this point in the history
  • Loading branch information
heppu committed Dec 2, 2024
1 parent a65ddc6 commit 401800c
Show file tree
Hide file tree
Showing 25 changed files with 18 additions and 1,684 deletions.
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ updates:
schedule:
interval: "weekly"
day: "sunday"
- package-ecosystem: "gomod"
directory: "/godemo"
schedule:
interval: "weekly"
day: "sunday"
17 changes: 13 additions & 4 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

defaults:
run:
working-directory: ./godemo
working-directory: ./testdata/godemo

jobs:
base-build:
Expand Down Expand Up @@ -46,12 +46,21 @@ jobs:

- name: Verify dependencies
run: |
cd ../../
go mod tidy
git diff --exit-code -- ../go.mod ../go.sum ./go.mod ./go.sum || (echo "Deps are not up to date: run 'go mod tidy' before commit" && exit 1)
git diff --exit-code -- ./go.mod ./go.sum || (echo "Deps are not up to date: run 'go mod tidy' before commit" && exit 1)
- name: Prepare demo project
run: go mod tidy

- name: Verify tidy check
run: |
if mage go:tidyAndVerify; then
echo "mage go:tidyAndVerify should have failed"
exit 1
fi
- run: mage go:lint
- run: mage go:tidy
- run: mage go:tidyAndVerify

- name: Unit tests
run: |
Expand Down
405 changes: 0 additions & 405 deletions godemo/go.mod

This file was deleted.

1,270 changes: 0 additions & 1,270 deletions godemo/go.sum

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions testdata/godemo/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module godemo

// Deps will be added in CI to avoid dependabot issues.

replace github.com/elisasre/mageutil => ../../
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 401800c

Please sign in to comment.