-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.03 KB
/
go-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Go test workflow
on: [push]
#
env:
APP_ENV: runner
# Setting an environment variable with the value of a configuration variable
CLIENT_KEY: ${{ secrets.CLIENT_KEY }}
# Setting an environment variable with the value of a configuration variable
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
#
#
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.19.x', '1.20.x', '1.21.x', '1.22.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 ./...
#
#
#