-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update CI dependencies * Fix error style
- Loading branch information
Showing
3 changed files
with
38 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,48 @@ | ||
name: build | ||
on: [push, pull_request] | ||
jobs: | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test-build: | ||
name: Test & Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.13 | ||
uses: actions/setup-go@v1 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.13 | ||
id: go | ||
go-version: '>=1.20.0' | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run go mod tidy | ||
run: | | ||
set -e | ||
go mod tidy | ||
output=$(git status -s) | ||
if [ -z "${output}" ]; then | ||
exit 0 | ||
fi | ||
echo 'We wish to maintain a tidy state for go mod. Please run `go mod tidy` on your branch, commit and push again.' | ||
echo 'Running `go mod tidy` on this CI test yields with the following changes:' | ||
echo "$output" | ||
exit 1 | ||
- name: Test | ||
run: | | ||
go mod tidy -v | ||
go test -race ./... | ||
run: go test -race ./... | ||
|
||
- name: Lint | ||
run: "go vet ./..." | ||
|
||
- name: Staticcheck | ||
uses: dominikh/staticcheck-action@v1.2.0 | ||
with: | ||
version: "2023.1.1" | ||
install-go: false | ||
|
||
- name: Build | ||
run: go build ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/fatih/motion | ||
|
||
go 1.12 | ||
go 1.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters