-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- upgrade go version - improve rake tasks - upgrade docker dependencies - upgrade github actions
- Loading branch information
Showing
9 changed files
with
84 additions
and
52 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,49 +1,47 @@ | ||
name: build and test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- ST-* | ||
pull_request: | ||
- main | ||
tags-ignore: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.19 | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Get dependencies | ||
run: go mod download | ||
|
||
- name: Run tests | ||
run: go test -race -count=1 -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Build app | ||
id: build_go_app | ||
run: | | ||
go build -v . | ||
echo ::set-output name=exit_code::$? | ||
- name: Notify Slack on success | ||
if: steps.build_go_app.outputs.exit_code == 0 | ||
id: slack_notification | ||
uses: ravsamhq/notify-slack-action@v1 | ||
with: | ||
status: ${{ job.status }} | ||
notification_title: 'Build succeeded' | ||
message_format: 'Statoo build succeeded. <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>' | ||
footer: 'repo: <{repo_url}|{repo}>' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: "go.mod" | ||
id: go | ||
|
||
- name: Run tests | ||
run: go test -race -count=1 -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Build app | ||
id: build_go_app | ||
run: | | ||
go build -v . | ||
echo ::set-output name=exit_code::$? | ||
- name: Notify Slack on success | ||
if: steps.build_go_app.outputs.exit_code == 0 | ||
id: slack_notification | ||
uses: ravsamhq/notify-slack-action@v1 | ||
with: | ||
status: ${{ job.status }} | ||
notification_title: 'Build succeeded' | ||
message_format: 'Statoo build succeeded. <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>' | ||
footer: 'repo: <{repo_url}|{repo}>' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |
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
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
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
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
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
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
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/vigo/statoo | ||
module github.com/vigo/statoo/v2 | ||
|
||
go 1.19 | ||
go 1.21 |
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