-
Notifications
You must be signed in to change notification settings - Fork 44
84 lines (84 loc) · 3.35 KB
/
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
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
73
74
75
76
77
78
79
80
81
82
83
84
#on: [push, pull_request]
on: [pull_request]
name: Test
jobs:
unit-test:
strategy:
matrix:
go-version: [1.14.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Unit Test
if: ${{ matrix.platform != 'windows-latest' }}
run: go test -race -coverprofile=coverage/unitcoverage.out $(go list ./... | grep -v integration_tests)
- name: Unit Test (Win)
if: ${{ matrix.platform == 'windows-latest' }} # skipping coverage collection on windows
run: go test -race $(go list ./... | grep -v integration_tests)
- name: Coveralls
if: ${{ matrix.platform != 'windows-latest' }}
uses: shogo82148/actions-goveralls@v1
with:
flag-name: unit-test-${{ matrix.platform }}
path-to-profile: coverage/unitcoverage.out
parallel: true
integration-test:
strategy:
matrix:
go-version: [ 1.14.x ]
# platform: [ ubuntu-latest, macos-latest, windows-latest ]
platform: [ macos-latest ]
runs-on: ${{ matrix.platform }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SERVICES_API_URL: ${{ secrets.outputs.SERVICES_API_URL_DEV }}
VAULT_API_URL: ${{ secrets.VAULT_API_URL_DEV }}
VAULT_SALT_SECRET: ${{ secrets.VAULT_SALT_SECRET_DEV }}
SERVICES_HUB_AUTH_URL: ${{ secrets.SERVICES_HUB_AUTH_URL_DEV }}
TXL_HUB_TARGET: ${{ secrets.TXL_HUB_TARGET_DEV }}
TXL_HUB_MA: ${{ secrets.TXL_HUB_MA_DEV }}
TXL_THREADS_TARGET: ${{ secrets.TXL_THREADS_TARGET_DEV }}
TXL_HUB_GATEWAY_URL: ${{ secrets.TXL_HUB_GATEWAY_URL_DEV }}
TXL_USER_KEY: ${{ secrets.TXL_USER_KEY_DEV }}
TXL_USER_SECRET: ${{ secrets.TXL_USER_SECRET_DEV }}
SPACE_STORAGE_SITE_URL: ${{ secrets.SPACE_STORAGE_SITE_URL_DEV }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install gnome-keyring (Ubuntu)
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: sudo apt-get install pass gnome-keyring dbus-x11
- name: Verify gnome-keyring is installed (Ubuntu)
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: gnome-keyring-daemon -V
- name: Checkout code
uses: actions/checkout@v2
- name: Integration Test
if: ${{ matrix.platform != 'windows-latest' }}
run: go test -v -timeout 60m -coverprofile=coverage/integrationcoverage.out ./integration_tests/...
- name: Integration Test (Win)
if: ${{ matrix.platform == 'windows-latest' }} # skipping coverage collection on windows
run: go test -v -timeout 60m ./integration_tests/...
- name: Coveralls
if: ${{ matrix.platform != 'windows-latest' }}
uses: shogo82148/actions-goveralls@v1
with:
flag-name: integration-test-${{ matrix.platform }}
path-to-profile: coverage/integrationcoverage.out
parallel: true
submit-coverage:
needs: [unit-test, integration-test]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true