forked from crawlab-team/crawlab-core
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 792 Bytes
/
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
name: "Test"
on:
push:
branches: [ main, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, develop ]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
services:
mongo:
image: mongo:4.2
ports:
- 27017:27017
env:
CRAWLAB_SERVER_PORT: 9999
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: '^1.16'
- name: Run unit tests
run: |
mods=(\
"models" \
"export" \
"controllers" \
"apps" \
"process" \
)
for pkg in ${mods[@]}; do
go test ./${pkg}/...
done