Skip to content

Bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (#47) #269

Bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (#47)

Bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (#47) #269

Workflow file for this run

name: Go CI
on: [push, pull_request]
jobs:
format:
if: github.event_name == 'push'
name: Format go sources
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3.2.0
with:
go-version: "1.17"
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3.0.2
- name: run go format
id: gofmt
run: |
gofmt -w .
echo ::set-output name=formatted_files::$(git status -s -uno | wc -l)
- name: push formatting fixes
if: steps.gofmt.outputs.formatted_files > 0
run: |
git add -u
git config --global user.name "actions-go-bot"
git config --global user.email "actions-go@users.noreply.github.com"
git commit -m '[Auto] Fix source files formatting' -m 'This is an automatic commit standardizing go code formatting.' -m 'To avoid this commit, ensure to run `gofmt -w .` before committing any change'
git config --global credential.helper store
git push origin HEAD:${{ github.event.ref }}
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
coverageArgs: ["-coverprofile=coverage.txt -covermode=atomic"]
include:
- os: windows-latest
go-version: 1.17
coverageArgs: ""
go-version: [1.17]
name: Build
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v3.2.0
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3.0.2
- name: Get dependencies
run: go mod download
- name: run tests
if: ${{ matrix.os }} != "windows-latest"
env:
# unauthenticated calls have lower limits than authenticated ones
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: go test -v -race ${{ matrix.coverageArgs }} ./...