-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (34 loc) · 1.23 KB
/
az-mpf-ci.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
name: Build and Unit Test az-mpf
on: [push]
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go get ./...
- name: Build
run: go build -v ./...
- name: Test with Go
run: |
go install github.com/jstemmer/go-junit-report@latest
go test -v ./pkg/domain ./pkg/infrastructure/ARMTemplateShared ./pkg/infrastructure/mpfSharedUtils | go-junit-report -set-exit-code > TestResults-${{ matrix.go-version }}.xml
# go test -json ./pkg/domain ./pkg/infrastructure/ARMTemplateShared ./pkg/infrastructure/mpfSharedUtils > TestResults-${{ matrix.go-version }}.json
- name: Upload Go test results
uses: actions/upload-artifact@v4
with:
name: Go-results-${{ matrix.go-version }}
path: TestResults-${{ matrix.go-version }}.xml
- name: Test Summary
uses: test-summary/action@v1
with:
paths: |
TestResults-${{ matrix.go-version }}.xml
if: always()