Skip to content

fix: uploading file always being skipped in GitHub Action #4

fix: uploading file always being skipped in GitHub Action

fix: uploading file always being skipped in GitHub Action #4

Workflow file for this run

name: Dev CI
permissions:
contents: read
on:
push:
branches: [dev]
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
go: ['stable', 'oldstable']
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Cache Go Modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Go Format
run: |
gofmt -s -w .
if [ -n "$(git diff --exit-code)" ]; then
echo "::warning::there are uncommitted changes after running go fmt"
fi
- name: Go Vet
run: go vet ./...
- name: Go Tidy
run: go mod tidy
- name: Go Mod Download
run: go mod download
- name: Go Mod Verify
run: go mod verify
- name: Go Generate
run: |
go generate ./...
if [ -n "$(git diff --exit-code)" ]; then
echo "::warning::there are uncommitted changes after running go generate"
fi
- name: Go Test
run: go test -v -count=1 -race -shuffle=on -coverprofile=coverage.txt ./...