Skip to content

Commit fccab87

Browse files
authored
Merge pull request #141 from scribd/maksimt/DEVPLAT-3096/dependencies-check
[DEVPLAT-3096] Verify dependencies
2 parents d670944 + bcdf303 commit fccab87

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
jobs:
1111
build:
1212
name: build
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
@@ -45,7 +45,7 @@ jobs:
4545

4646
check:
4747
name: check
48-
runs-on: ubuntu-20.04
48+
runs-on: ubuntu-24.04
4949
needs: build
5050
steps:
5151
- name: Checkout
@@ -97,10 +97,19 @@ jobs:
9797
image: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
9898
run: mage fmt:lint
9999

100+
- uses: addnab/docker-run-action@v2
101+
# Run an image built by a previous step.
102+
# https://github.com/addnab/docker-run-action
103+
# https://github.com/marketplace/actions/docker-run-action
104+
name: Run dependencies check
105+
with:
106+
image: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
107+
run: mage deps:check
108+
100109
test:
101110
name: test
102111
needs: [build, check]
103-
runs-on: ubuntu-20.04
112+
runs-on: ubuntu-24.04
104113
steps:
105114
- name: Checkout
106115
uses: actions/checkout@v4

.github/workflows/pr-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
check-commit-message:
1212
name: Check Commit Message
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Check Commit Message
1616
uses: gsactions/commit-message-checker@v2

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN apk add --no-cache \
1515
tzdata
1616

1717
COPY ./go.mod ./go.sum ./
18-
RUN go mod download
18+
RUN go mod download && go mod verify
1919

2020
COPY . .
2121

magefile.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,10 @@ func (Fmt) Lint() error {
6969
lintCmd := "golangci-lint"
7070
return sh.RunV(lintCmd, "run")
7171
}
72+
73+
type Deps mg.Namespace
74+
75+
// Checks the dependencies.
76+
func (Deps) Check() error {
77+
return sh.RunV(mg.GoCmd(), "mod", "tidy", "-diff")
78+
}

0 commit comments

Comments
 (0)