Skip to content

Commit 0b94d3f

Browse files
authored
test: unit tests with workflow (#444)
* test: data group plan modifier tests * fix: unit test workflow
1 parent 9d12523 commit 0b94d3f

File tree

2 files changed

+154
-179
lines changed

2 files changed

+154
-179
lines changed

.github/workflows/unit-test.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Test"
2+
3+
# Run this workflow every time a new commit pushed to your repository
4+
on: push
5+
6+
env:
7+
GOLANG_VERSION: "1.21.x"
8+
9+
jobs:
10+
test:
11+
strategy:
12+
matrix:
13+
os: [ ubuntu-latest, windows-latest, macOS-latest ]
14+
15+
name: test code base
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/[email protected]
21+
22+
- name: Configure Git for private modules
23+
shell: bash
24+
env:
25+
GITHUB_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
26+
run: git config --global url."https://x:${GITHUB_API_TOKEN}@github.com".insteadOf "https://github.com"
27+
28+
- name: Install Go
29+
uses: actions/setup-go@v3
30+
with:
31+
go-version: ${{ env.GOLANG_VERSION }}
32+
33+
- name: Run unit tests
34+
run: go test -p=1 -v ./...

0 commit comments

Comments
 (0)