|
3 | 3 | workflow_dispatch: {}
|
4 | 4 | push:
|
5 | 5 | branches: [ master, devel ]
|
6 |
| - paths: [ '**.go' ] |
| 6 | + paths: [ '**.go', '.github/workflows/*' ] |
7 | 7 | pull_request:
|
8 | 8 | branches: [ master ]
|
9 |
| - paths: [ '**.go' ] |
| 9 | + paths: [ '**.go', '.github/workflows/*' ] |
10 | 10 | jobs:
|
11 |
| - tests: |
| 11 | + master_tests: |
| 12 | + if: github.ref_name == 'master' |
12 | 13 | strategy:
|
13 | 14 | fail-fast: false
|
14 | 15 | matrix:
|
15 |
| - go: [ '1.24', '1.22', '1.19', '1.17', '1.11' ] |
| 16 | + go: [ '1.24', '1.19', '1.17', '1.11' ] |
16 | 17 | arch: [ amd64 ]
|
17 | 18 | os: [ ubuntu-latest ]
|
18 | 19 | include:
|
19 |
| - - go: '1.22' |
| 20 | + - go: '1.19' |
20 | 21 | arch: '386'
|
21 | 22 | os: ubuntu-latest
|
22 | 23 | runs-on: ${{ matrix.os }}
|
23 | 24 | env:
|
24 | 25 | GO111MODULE: 'on'
|
25 |
| - COVER_GO_VERSION: '1.22' |
| 26 | + COVER_GO_VERSION: '1.19' |
26 | 27 | GOARCH: ${{ matrix.arch }}
|
27 |
| - name: go ${{ matrix.go }} on ${{ matrix.arch }} |
| 28 | + name: go ${{ matrix.go }} on ${{ matrix.arch }} at branch ${{ github.ref_name }} |
28 | 29 | steps:
|
29 | 30 | - uses: actions/checkout@v3
|
30 | 31 | - uses: actions/setup-go@v3
|
31 | 32 | with:
|
32 | 33 | go-version: ${{ matrix.go }}
|
33 |
| - - shell: bash |
34 |
| - run: cd codec; go get github.com/google/go-cmp/cmp |
35 |
| - if: github.ref_name == 'devel' |
36 | 34 | - name: Run tests
|
37 |
| - if: >- |
38 |
| - (github.ref_name == 'master' && matrix.go == '1.24') || |
39 |
| - (github.ref_name == 'master' && matrix.go == '1.19') || |
40 |
| - (github.ref_name == 'master' && matrix.go == '1.17') || |
41 |
| - (github.ref_name == 'master' && matrix.go == '1.11') || |
42 |
| - (github.ref_name == 'devel' && matrix.go == '1.24') || |
43 |
| - (github.ref_name == 'devel' && matrix.go == '1.22') |
44 | 35 | shell: bash
|
45 | 36 | run: |
|
46 | 37 | cd codec
|
|
53 | 44 | if: matrix.go == env.COVER_GO_VERSION
|
54 | 45 | with:
|
55 | 46 | directory: ./codec
|
| 47 | + devel_tests: |
| 48 | + if: github.ref_name == 'devel' |
| 49 | + strategy: |
| 50 | + fail-fast: false |
| 51 | + matrix: |
| 52 | + go: [ '1.24', '1.22' ] |
| 53 | + arch: [ amd64 ] |
| 54 | + os: [ ubuntu-latest ] |
| 55 | + include: |
| 56 | + - go: '1.22' |
| 57 | + arch: '386' |
| 58 | + os: ubuntu-latest |
| 59 | + runs-on: ${{ matrix.os }} |
| 60 | + env: |
| 61 | + GO111MODULE: 'on' |
| 62 | + GOARCH: ${{ matrix.arch }} |
| 63 | + name: go ${{ matrix.go }} on ${{ matrix.arch }} at branch ${{ github.ref_name }} |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v3 |
| 66 | + - uses: actions/setup-go@v3 |
| 67 | + with: |
| 68 | + go-version: ${{ matrix.go }} |
| 69 | + - shell: bash |
| 70 | + run: cd codec; go get github.com/google/go-cmp/cmp |
| 71 | + - name: Run tests |
| 72 | + shell: bash |
| 73 | + run: | |
| 74 | + cd codec |
| 75 | + go mod edit -droprequire github.com/ugorji/go |
| 76 | + t=( "" "safe" "notfastpath" "notmono" ) |
| 77 | + for i in "${t[@]}"; do |
| 78 | + go test "-tags=alltests ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt" |
| 79 | + done |
56 | 80 |
|
57 | 81 |
|
58 | 82 | # No need to go get, as github knows its working out of this folder.
|
|
0 commit comments