-
-
Notifications
You must be signed in to change notification settings - Fork 33
60 lines (49 loc) · 1.4 KB
/
ci.yml
File metadata and controls
60 lines (49 loc) · 1.4 KB
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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ['1.25', '1.26']
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build ./...
- name: Test
run: go test -v -count=1 ./...
- name: Build SAPIs
run: |
go build ./sapi/php-cli
go build ./sapi/php-cgi
go build ./sapi/php-fpm
go build ./sapi/php-httpd
- name: Vet
run: go vet ./...
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test with coverage
# Don't mark the job failed on test failures — the `test` job already
# surfaces those, and we still want the coverage.out file that go test
# writes incrementally to reach Coveralls.
continue-on-error: true
run: go test -v -count=1 -covermode=count -coverpkg=./... -coverprofile=coverage.out ./...
- name: Upload coverage to Coveralls
if: always() && hashFiles('coverage.out') != ''
uses: coverallsapp/github-action@v2
with:
file: coverage.out
format: golang