Skip to content

Commit 6adca65

Browse files
committed
updated github workflow to test out master branch only
1 parent c121472 commit 6adca65

File tree

1 file changed

+7
-46
lines changed

1 file changed

+7
-46
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Test go-codec
22
on:
33
workflow_dispatch: {}
44
push:
5-
branches: [ master, devel ]
5+
branches: [ master ]
66
paths: [ '**.go', '.github/workflows/*' ]
77
pull_request:
88
branches: [ master ]
@@ -13,29 +13,31 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
go: [ '1.24', '1.19', '1.17', '1.11' ]
16+
go: [ '1.24', '1.23', '1.22', '1.21' ]
1717
arch: [ amd64 ]
1818
os: [ ubuntu-latest ]
1919
include:
20-
- go: '1.19'
20+
- go: '1.24'
2121
arch: '386'
2222
os: ubuntu-latest
2323
runs-on: ${{ matrix.os }}
2424
env:
2525
GO111MODULE: 'on'
26-
COVER_GO_VERSION: '1.19'
26+
COVER_GO_VERSION: '1.24'
2727
GOARCH: ${{ matrix.arch }}
2828
name: go ${{ matrix.go }} on ${{ matrix.arch }} at branch ${{ github.ref_name }}
2929
steps:
3030
- uses: actions/checkout@v3
3131
- uses: actions/setup-go@v3
3232
with:
3333
go-version: ${{ matrix.go }}
34+
- shell: bash
35+
run: cd codec; go get github.com/google/go-cmp/cmp
3436
- name: Run tests
3537
shell: bash
3638
run: |
3739
cd codec
38-
go mod edit -droprequire github.com/ugorji/go
40+
# go mod edit -droprequire github.com/ugorji/go
3941
t=( "" "safe" "notfastpath" "notmono" )
4042
for i in "${t[@]}"; do
4143
go test "-tags=alltests codec.nobench ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"
@@ -44,60 +46,19 @@ jobs:
4446
if: matrix.go == env.COVER_GO_VERSION
4547
with:
4648
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 codec.nobench ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"
79-
done
8049

8150

8251
# No need to go get, as github knows its working out of this folder.
8352
#
84-
# Most of our code is the same since go1.12; before that we selectively compile files using build constraints.
85-
#
8653
# We test against the following go releases
8754
# - latest production release
8855
# - 2 releases before that
89-
# - an archive version (go 1.11)
9056
# - and a beta/rc of development release (so github can just download an archive of it and use)
9157
#
9258
# Pre-release versions must use semver e.g. as of 20221220, it's '1.20.0-rc.1'
93-
# TODO: add this back once we resolve the issue with go-codec failing on development branch.
9459
#
9560
# We test amd64 on all releases, and i386 (32-bit) on last production release.
9661
#
97-
# We previously had each tag be its own matrix, but that exploded the number of runs.
98-
# Instead, since the environment is consistent, we just use a bash script to run through all
99-
# the tags for that run.
100-
#
10162
# Finally, we do a go mod edit -droprequire github.com/ugorji/go to circumvent the "missing go.sum entry" error.
10263
# We put a requirements cycle with github.com/ugorji/go to allow folks requiring .../ugorji/go in 2019 to work ok.
10364
# Now, everyone should have updated to a go-codec version >= 1.17 or preferably >= 1.2.0.

0 commit comments

Comments
 (0)