-
-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (59 loc) · 1.68 KB
/
ginkgo.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
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
name: ginkgo
on:
push:
tags-ignore:
- '**'
branches:
- master
pull_request:
jobs:
mod:
runs-on: ubuntu-latest
name: Check modules
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
go.*
**/*.go
- name: Verify Go Modules Setup
if: steps.changed-files.outputs.any_changed == 'true'
run: go mod verify
- run: go mod tidy && git diff --exit-code go.mod go.sum
if: steps.changed-files.outputs.any_changed == 'true'
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
go.*
**/*.go
- run: go vet ./...
- name: Install ginkgo
if: steps.changed-files.outputs.any_changed == 'true'
run: go get github.com/onsi/ginkgo/v2/ginkgo
- name: Print out Ginkgo version
if: steps.changed-files.outputs.any_changed == 'true'
run: go run github.com/onsi/ginkgo/v2/ginkgo version
- name: Launch tests
if: steps.changed-files.outputs.any_changed == 'true'
run: go run github.com/onsi/ginkgo/v2/ginkgo -r --randomize-all --randomize-suites --race --trace -cover