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

[DEVPLAT-3096] Verify dependencies #141

Merged
merged 4 commits into from
Mar 4, 2025
Merged
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
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
build:
name: build
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:

check:
name: check
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: build
steps:
- name: Checkout
Expand Down Expand Up @@ -97,10 +97,19 @@ jobs:
image: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
run: mage fmt:lint

- uses: addnab/docker-run-action@v2
# Run an image built by a previous step.
# https://github.com/addnab/docker-run-action
# https://github.com/marketplace/actions/docker-run-action
name: Run dependencies check
with:
image: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
run: mage deps:check

test:
name: test
needs: [build, check]
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Check Commit Message
uses: gsactions/commit-message-checker@v2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apk add --no-cache \
tzdata

COPY ./go.mod ./go.sum ./
RUN go mod download
RUN go mod download && go mod verify

COPY . .

Expand Down
7 changes: 7 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,10 @@ func (Fmt) Lint() error {
lintCmd := "golangci-lint"
return sh.RunV(lintCmd, "run")
}

type Deps mg.Namespace

// Checks the dependencies.
func (Deps) Check() error {
return sh.RunV(mg.GoCmd(), "mod", "tidy", "-diff")
}