-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (51 loc) · 1.5 KB
/
yamly.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
name: yamly
on:
push:
branches:
- "main"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ 1.21 ]
name: Tests with Go ${{ matrix.go-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Build engines
run: find ./engines -type f -name go.mod -execdir go build -v ./... \;
- name: Test
run: go test -race -covermode=atomic -coverprofile=yamly-coverage.out -v ./...
- name: Test engines
run: find ./engines -type f -name go.mod -execdir go test -covermode=atomic -coverprofile=engine-coverage.out -race -v ./... \;
- name: Test integration
run: cd ./test && go test -race -v ./...
- name: Upload coverage
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module: [".", "./engines/yayamls", "./engines/goyaml", "./test"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.21
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
working-directory: ${{ matrix.module }}
args: --timeout=5m -v