diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c27146..f5c99bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -45,7 +45,7 @@ jobs: check: name: check - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: build steps: - name: Checkout @@ -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 diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index bf437e9..02e7038 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 7c8bdfb..132fb65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 . . diff --git a/magefile.go b/magefile.go index 8ca9e01..972c471 100644 --- a/magefile.go +++ b/magefile.go @@ -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") +}