Skip to content

Commit a6eb00d

Browse files
authored
Create go.yml
1 parent 8cb30db commit a6eb00d

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/go.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Go (build)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macOS-latest, windows-latest]
16+
17+
steps:
18+
- name: Check out code into $GITHUB_WORKSPACE directory
19+
uses: actions/checkout@v3.5.2
20+
21+
- name: Read env file
22+
id: dotenv
23+
uses: falti/dotenv-action@v1.0.4
24+
with:
25+
path: ./.devops/.env
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v4.0.1
29+
with:
30+
go-version: ${{ steps.dotenv.outputs.GO_VERSION }}
31+
id: go
32+
33+
- name: Get dependencies
34+
run: |
35+
go get -v -t -d ./...
36+
37+
- name: Build
38+
run: |
39+
go build -v ./...
40+
41+
- name: Test
42+
run: |
43+
go test -v ./...

0 commit comments

Comments
 (0)