forked from kataras/iris
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (44 loc) · 1.21 KB
/
ci.yml
File metadata and controls
56 lines (44 loc) · 1.21 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [1.20.x]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
cache: false
go-version: ${{ matrix.go_version }}
cache-dependency-path: './go.sum'
- name: Verify go dependency paths
run: |
echo "$(go env GOMODCACHE)";
echo "$(go env GOCACHE)"
- name: Cache Go dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('./go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ matrix.go-version }}-
path: |
/home/runner/go/pkg/mod
/home/runner/.cache/go-build
- name: Test
run: go test -v ./...
- name: Setup examples for testing
run: ./.github/scripts/setup_examples_test.bash
- name: Test examples
continue-on-error: true
working-directory: _examples
run: go test -v -mod=mod -cover -race ./...