Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76a516f2a3 | ||
|
|
c79426ef98 | ||
|
|
d23fd33d0d | ||
|
|
1a5ca78da5 | ||
|
|
5147d5f6cd | ||
|
|
1971468038 | ||
|
|
0d98c9d29d | ||
|
|
fba0473ccd | ||
|
|
d3f130af1c | ||
|
|
f953915e15 | ||
|
|
fc1ff57fc8 | ||
|
|
feb7d5cf4b |
No files matched your search
@@ -11,7 +11,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
|
|||||||
+43
-32
@@ -8,6 +8,48 @@ on:
|
|||||||
- master
|
- master
|
||||||
name: Run tests
|
name: Run tests
|
||||||
jobs:
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
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:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -20,41 +62,10 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
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
|
- name: Test
|
||||||
run: go test ./...
|
run: go test ./...
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,12 @@ on:
|
|||||||
workflows: ["Run tests"]
|
workflows: ["Run tests"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
@@ -16,6 +19,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Bump version and push tag
|
- name: Bump version and push tag
|
||||||
id: tag_version
|
id: tag_version
|
||||||
uses: mathieudutour/github-tag-action@v6.1
|
uses: mathieudutour/github-tag-action@v6.2
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -2,4 +2,4 @@ module github.com/iand/microdata
|
|||||||
|
|
||||||
go 1.21.4
|
go 1.21.4
|
||||||
|
|
||||||
require golang.org/x/net v0.18.0
|
require golang.org/x/net v0.24.0
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
|
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
|
||||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
|
||||||
Reference in new issue
Block a user