-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (77 loc) · 2.05 KB
/
gnoffee.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
75
76
77
78
79
80
81
82
83
name: gnoffee
on:
pull_request:
paths:
- "go.sum"
- "**.go"
- "**.gnoffee"
- ".github/workflows/gnoffee.yml"
push:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
go-version:
- "1.20.x"
- "1.21.x"
goarch:
- "amd64"
goos:
- "linux"
program:
- "gnoffee"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: go install
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go install ./cmd/${{ matrix.program }}
test:
strategy:
fail-fast: false
matrix:
go-version:
- "1.20.x"
- "1.21.x"
args:
- "test"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: test
run: |
export GOPATH=$HOME/go
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic"
make ${{ matrix.args }}
#- if: runner.os == 'Linux'
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# name: gnoffee
# flags: gnoffee,gnoffee-${{matrix.args}},go-${{ matrix.go-version }}
# files: ./coverage.out
# #fail_ci_if_error: ${{ github.repository == 'gnolang/gnoffee' }}
# fail_ci_if_error: false # temporarily
#docker-integration:
# strategy:
# fail-fast: false
# runs-on: ubuntu-latest
# timeout-minutes: 10
# steps:
# - uses: actions/checkout@v3
# # TODO: setup docker caching
# - run: make test.docker
# - run: docker logs int_gnoffee || true
# TODO: docker-less integration test?