-
Notifications
You must be signed in to change notification settings - Fork 104
47 lines (39 loc) · 1.11 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
name: Test
on:
push:
branches:
- main
tags:
- "*"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container:
image: internalpcfplatformautomation/ci:testing
steps:
- name: Checkout OM
uses: actions/checkout@v2
with:
fetch-depth: 0
path: om
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
- name: Test
run: |
go install github.com/onsi/ginkgo/ginkgo
ginkgo -r -race -succinct -randomizeAllSpecs -randomizeSuites -keepGoing \
-skipPackage acceptance,vmlifecyclecommands,vmmanagers \
-covermode=atomic -coverprofile=coverage.out .
mkdir -p ../coverage
find . -type f -name '*.out' | xargs -I{} bash -c 'mv {} "../coverage/$(echo {} | sha1sum | head -c 40 ).out"'
working-directory: om
env:
CGO_ENABLED: 1
- name: Archive Unit Test Code Coverage Output
uses: actions/upload-artifact@v3
with:
name: Unit Test Code Coverage Output
path: coverage/*.out