Compare commits

...
6 Commits
Author SHA1 Message Date
github-actions[bot]andBot 0d98c9d29d Update package dependencies + tidy (#39)
Weekly update to the project's package dependencies initiated by an
automatic GitHub Action running on cron. Keeps upgrades less of a
monolithic task and lets security-related patches trickle in more
quickly.

Co-authored-by: Bot <bot@iandavis.com>
2024-01-10 10:04:51 +00:00
github-actions[bot]andBot fba0473ccd Update package dependencies + tidy (#38)
Weekly update to the project's package dependencies initiated by an
automatic GitHub Action running on cron. Keeps upgrades less of a
monolithic task and lets security-related patches trickle in more
quickly.

Co-authored-by: Bot <bot@iandavis.com>
2023-11-29 09:04:00 +00:00
Ian Davis d3f130af1c Updated github workflows 2023-11-25 13:56:48 +00:00
Ian Davis f953915e15 Updated github workflows 2023-11-25 13:51:42 +00:00
Ian Davis fc1ff57fc8 Updated github workflows 2023-11-25 13:47:07 +00:00
Ian Davis feb7d5cf4b Updated github workflows 2023-11-25 13:39:16 +00:00
4 changed files with 49 additions and 35 deletions

No files matched your search

+42 -31
View File
@@ -8,6 +8,48 @@ on:
- master
name: Run tests
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Get StaticCheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Gomod
run: |
go mod tidy
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
echo "go.sum was added by go mod tidy"
exit 1
fi
git diff --exit-code -- go.sum go.mod
- name: Gofmt
if: ${{ success() || failure() }} # run this step even if the previous one failed
run: |
out=$(gofmt -s -l .)
if [[ -n "$out" ]]; then
echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
exit 1
fi
- name: Vet
if: ${{ success() || failure() }} # run this step even if the previous one failed
run: go vet ./...
- name: StaticCheck
if: ${{ success() || failure() }} # run this step even if the previous one failed
run: staticcheck ./...
test:
strategy:
matrix:
@@ -24,37 +66,6 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Get StaticCheck
if: ${{ matrix.os == 'ubuntu' }}
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Gomod
if: ${{ matrix.os == 'ubuntu' }}
run: |
go mod tidy
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
echo "go.sum was added by go mod tidy"
exit 1
fi
git diff --exit-code -- go.sum go.mod
- name: Gofmt
if: ${{ matrix.os == 'ubuntu' && (success() || failure()) }} # run this step even if the previous one failed
run: |
out=$(gofmt -s -l .)
if [[ -n "$out" ]]; then
echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
exit 1
fi
- name: Vet
if: ${{ matrix.os == 'ubuntu' && (success() || failure()) }} # run this step even if the previous one failed
run: go vet ./...
- name: StaticCheck
if: ${{ matrix.os == 'ubuntu' && (success() || failure()) }} # run this step even if the previous one failed
run: staticcheck ./...
- name: Test
run: go test ./...
+4 -1
View File
@@ -5,9 +5,12 @@ on:
workflows: ["Run tests"]
types:
- completed
branches:
- main
- master
jobs:
build:
version:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
+1 -1
View File
@@ -2,4 +2,4 @@ module github.com/iand/microdata
go 1.21.4
require golang.org/x/net v0.18.0
require golang.org/x/net v0.20.0
+2 -2
View File
@@ -1,2 +1,2 @@
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=