build(deps): bump actions/cache from 3.3.1 to 4.0.0 #169
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: "*" | |
jobs: | |
build: | |
name: ${{ matrix.os }} - Go ${{ matrix.go_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# If you want to matrix build , you can append the following list. | |
matrix: | |
go_version: | |
- 1.15 | |
os: | |
- ubuntu-latest | |
env: | |
DING_TOKEN: ${{ secrets.DING_TOKEN }} | |
DING_SIGN: ${{ secrets.DING_SIGN }} | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go_version }} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v4.0.0 | |
with: | |
# Cache | |
path: ~/go/pkg/mod | |
# Cache key | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Get dependencies | |
run: | | |
if [ -f Gopkg.toml ]; then | |
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | |
dep ensure | |
else | |
go get -v -t -d ./... | |
fi | |
- name: gofmt | |
run: | | |
go fmt ./... && git status && [[ -z `git status -s` ]] | |
# diff -u <(echo -n) <(gofmt -d -s .) | |
- name: Install go ci lint | |
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0 | |
- name: Run Linter | |
run: golangci-lint run --timeout=10m -v | |
- name: Verify | |
run: | | |
make verify | |
# - name: Integrate Test | |
# run: | | |
# cd example && chmod +x ./start_integrate_test.sh && chmod +x ./integrate_test.sh && ./start_integrate_test.sh | |
- name: Post Coverage | |
run: bash <(curl -s https://codecov.io/bash) |