-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (35 loc) · 1.04 KB
/
pr-validation.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
name: 'PR and Commit Validation'
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- "releases.json"
jobs:
test:
runs-on: ubuntu-latest
permissions: # https://github.com/dorny/test-reporter/issues/168
statuses: write
checks: write
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
# if we just run the unit tests then go doesn't compile the parts of the app that aren't covered by
# unit tests; this forces it
- name: Build binary
run: go build -o bin/octopus cmd/octopus/main.go
- name: Setup gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Unit Tests
run: gotestsum --format testname --junitfile ../unit-tests.xml
working-directory: ./pkg
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test Results
path: '*-tests.xml'
reporter: java-junit