Skip to content

Commit

Permalink
go test
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Mar 8, 2024
1 parent 4c9bca7 commit 536d61d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/go-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go build
#
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
#
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.19.x', '1.20.x', '1.21.x' ]
steps:
- uses: actions/checkout@v3
#
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
#cache-dependency-path: subdir/go.sum
cache: true
#
- name: Build
run: go build -v ./...
#
#
37 changes: 37 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Go test workflow
on: [push]
#
env:
APP_ENV: runner
#
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.19.x', '1.20.x', '1.21.x' ]
#
steps:
- uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
#cache-dependency-path: subdir/go.sum
#
# You can test your matrix by printing the current Go version
- name: Display Go version
run: go version
#
- name: Install dependencies
run: go mod tidy
#
- name: Build
run: go build -v ./...
#
- name: Test with the Go CLI
run: go test -v ./...
#
#
#

0 comments on commit 536d61d

Please sign in to comment.