forked from muety/wakapi
-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (46 loc) · 1.5 KB
/
ci.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: ci
on:
push:
pull_request:
jobs:
test:
name: 'Unit- & API tests'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
id: go
- name: Get dependencies
run: go get
- name: Unit Tests
run: CGO_ENABLED=0 go test `go list ./... | grep -v 'github.com/kcoderhtml/hackatime/scripts'` -run ./... # skip scripts package, because not actually a package
- name: API Tests
run: |
npm -g install newman
./testing/run_api_tests.sh
- name: Mail Tests
run: ./testing/run_mail_tests.sh
migration:
name: Migration tests
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
db: [sqlite, postgres, mysql, mariadb, mssql]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
id: go
- run: ./testing/run_api_tests.sh ${{ matrix.db }} --migration