Skip to content

Commit

Permalink
go test
Browse files Browse the repository at this point in the history
  • Loading branch information
dawkaka committed Apr 9, 2024
1 parent c94dd89 commit bf67269
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,58 @@ name: Go

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
test:
name: Test
strategy:
fail-fast: true
matrix:
go: ['1.20', '1.21']
os: ['ubuntu-latest']
go: ["1.20", "1.21"]
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3

- name: Format
run: gofmt -s -w . && git diff --exit-code
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Vet
run: go vet ./...
- name: Format
run: gofmt -s -w . && git diff --exit-code

- name: Tidy
run: go mod tidy && git diff --exit-code
- name: Vet
run: go vet ./...

- name: Mod
run: go mod download
- name: Tidy
run: go mod tidy && git diff --exit-code

- name: Mod Verify
run: go mod verify
- name: Mod
run: go mod download

- name: Generate
run: go generate ./... && git diff --exit-code
- name: Mod Verify
run: go mod verify

- name: Test
run: go test -v -count=1 -race -shuffle=on -cover ./...
env:
APITOOLKIT_KEY: ${{ secrets.APITOOLKIT_KEY }}
- name: Generate
run: go generate ./... && git diff --exit-code

- name: Test
run: go test
env:
APITOOLKIT_KEY: ${{ secrets.APITOOLKIT_KEY }}

build:
name: Build
strategy:
fail-fast: true
matrix:
go: ['1.20', '1.21']
os: ['ubuntu-latest']
go: ["1.20", "1.21"]
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}

steps:
Expand Down

0 comments on commit bf67269

Please sign in to comment.