-
Notifications
You must be signed in to change notification settings - Fork 40
72 lines (67 loc) · 1.98 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
# Run once daily at 12 AM UTC, 8 PM EST
schedule:
- cron: '0 0 * * *'
# Run this on pushes to any branch
push:
jobs:
unit_test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-go@v3
with:
go-version: '~1.22.2'
- name: Generate Version
run: grep -m 1 -P "## \[\d+\.\d+\.\d+\] -" CHANGELOG.md | grep -o -P "\d+\.\d+\.\d+" > VERSION
- name: go mod tidy
run: ./bin/go_mod_tidy
- name: Unit tests
run: ./bin/test_unit
build_and_test:
name: Build and Functional Tests on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-go@v3
with:
go-version: '~1.22.2'
- name: Generate Version
run: grep -m 1 -P "## \[\d+\.\d+\.\d+\] -" CHANGELOG.md | grep -o -P "\d+\.\d+\.\d+" > VERSION
- name: go mod tidy
run: ./bin/go_mod_tidy
- name: Build
run: ./bin/build
- name: Integration tests
run: ./bin/test
osx_test:
name: Functional Tests on macOS
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# Cache go module dependencies based on go.sum to improve workflow execution time.
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# Install go1.22
- uses: actions/setup-go@v3
with:
go-version: '~1.22.2'
# Get go version
- run: go version
# Download go modules
- run: go mod download
- run: go mod tidy -compat=$(grep -E "^go\s\d+\.\d+" go.mod | grep -oE "\d+\.\d+")
# Run keychain tests
- run: cd test/providers/keychain && ./start && ./test && ./stop