Skip to content

build(deps): update all non-major dependencies #946

build(deps): update all non-major dependencies

build(deps): update all non-major dependencies #946

Workflow file for this run

name: Go
on:
push:
branches: ["main"]
pull_request:
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: 🛡️ Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
auth.docker.io:443
cli.codecov.io:443
github.com:443
go.dev:443
golang.org:443
ingest.codecov.io:443
keybase.io:443
objects.githubusercontent.com:443
production.cloudflare.docker.com:443
proxy.golang.org:443
raw.githubusercontent.com:443
registry-1.docker.io:443
release-assets.githubusercontent.com:443
storage.googleapis.com:443
sum.golang.org:443
- name: 🚚 Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: 🏗️ Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: "go.mod"
- name: 🏗️Set up Just
uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b
with:
just-version: 1.46.0
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: ⚙️ Setup Nut Server
run: |
CONTAINER_TOOL=docker just start-nut-server
- name: 📝 Generate SSL certificates
run: |
just generate-certs
- name: 🧪 Run `go test`
run: |
just test
- name: ⚙️ Shut down Nut Server
run: |
CONTAINER_TOOL=docker just stop-nut-server
- name: ☂️ Report coverage rates to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
fail_ci_if_error: true # default: false
files: ./coverage.txt
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
regenerate:
name: Regenerate
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: 🛡️ Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
disable-sudo: true
policy: test.regenerate
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
go.dev:443
golang.org:443
objects.githubusercontent.com:443
proxy.golang.org:443
release-assets.githubusercontent.com:443
storage.googleapis.com:443
sum.golang.org:443
- name: 🚚 Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: 🏗️ Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: "go.mod"
- name: 🧪 Run `go mod tidy`
run: |
go mod tidy
- name: 🔍 Check if any files are changed
run: |
if ! git diff --exit-code; then
echo "Please run 'go mod tidy'"
exit 1
fi
#- name: 🎭 Install GoMock
#run: go install go.uber.org/mock/mockgen@v0.3.0
- name: 🧪 Run `go generate`
run: |
# rm -rf ./internal/mocks
go generate ./...
- name: 🔍 Check if any files are changed
run: |
if ! git diff --exit-code; then
echo "Please run 'go gonerate ./...'"
exit 1
fi