forked from apache/incubator-devlake
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 868 Bytes
/
test.yml
File metadata and controls
40 lines (39 loc) · 868 Bytes
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
name: unit-test
on:
pull_request:
branches: [ main ]
paths:
- '**.go'
- 'Makefile'
- 'go.mod'
- 'go.sum'
- '.github/workflows/*.yml'
- 'test/**'
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
container:
image: mericodev/lake-builder:v0.0.5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Golang env
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Cache unit-test
id: cache-unit-test
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Unit tests
run: |
make unit-test