-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.05 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
name: Run Unit and Integration Tests
on:
workflow_call:
outputs:
coverage_artifact_url:
description: 'url of coverage artifact'
value: ${{ jobs.tests.outputs.artifact-url }}
push:
branches:
- 'main'
jobs:
tests:
runs-on: ubuntu-latest
outputs:
artifact-url: ${{ steps.artifact_upload.outputs.artifact-url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load environment
uses: c-py/action-dotenv-to-setenv@v4
with:
env-file: .github/development.env
- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run Unit Tests
working-directory: .
run: make unit
- name: Archive code coverage results
uses: actions/upload-artifact@v4
id: artifact_upload
with:
name: code-coverage
path: coverage.*
- name: Run Integration Tests
working-directory: .
run: make integration