-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (67 loc) · 2.44 KB
/
pr-test.yaml
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
---
name: Build and test
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
push:
branches:
- master
workflow_dispatch:
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true
env:
INDYKITE_APPLICATION_CREDENTIALS: ${{ secrets.APP_AGENT_CREDENTIALS }}
INDYKITE_SERVICE_ACCOUNT_CREDENTIALS: ${{ secrets.SERVICE_ACCOUNT_CREDENTIALS }}
TENANT_ID: ${{ secrets.TENANT_ID }}
CUSTOMER_ID: ${{ secrets.CUSTOMER_ID }}
LOCATION_ID: ${{ secrets.LOCATION_ID }}
PROJECT_ID: jarvis-dev-268314
PROJ_NUMBER: 699926043561
RUN_ENV: staging
jobs:
test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run Unit tests
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
# Notify us when failed, so devs are not waiting for Codecov report when it will never come.
# Because Codecov report is required to be able to merge, we have to run again the whole test anyway.
fail_ci_if_error: true
integration-test:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request && github.event.pull_request.draft == false)
name: Integration Test
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/[email protected]
with:
workload_identity_provider: projects/699926043561/locations/global/workloadIdentityPools/github-dev/providers/github-dev-provider
service_account: [email protected]
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run Integration tests
run: |
make integration