Skip to content

Commit d72fb28

Browse files
authored
Merge pull request #240 from setlog/feature/github_action_matrix_update
Add newer Ubuntu, Mac and Golang versions to testmatrix
2 parents f4f70d3 + d1e44c2 commit d72fb28

File tree

2 files changed

+15
-46
lines changed

2 files changed

+15
-46
lines changed

.github/workflows/push.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,20 @@ on:
55

66
jobs:
77
push:
8-
strategy:
9-
matrix:
10-
go-version: [1.13.x]
11-
platform: [ubuntu-18.04]
12-
runs-on: ${{ matrix.platform }}
13-
env:
14-
GO111MODULE: "on"
8+
runs-on: ubuntu-20.04
159

1610
steps:
1711
- name: Install Go
1812
uses: actions/[email protected]
1913
with:
20-
go-version: ${{ matrix.go-version }}
14+
go-version: 1.16
2115
- name: Install libgtk-3-dev
22-
if: matrix.platform == 'ubuntu-18.04'
23-
run: |
24-
sudo apt-get update -y
25-
sudo apt-get install -y libgtk-3-dev
26-
- name: Install goversioninfo
27-
shell: bash
28-
run: |
29-
export GOPATH="${HOME}/go"
30-
mkdir -p ${GOPATH}/bin
31-
mkdir -p ${GOPATH}/pkg
32-
mkdir -p ${GOPATH}/src
33-
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
16+
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev
3417
- name: Checkout repository
3518
uses: actions/[email protected]
36-
- name: Test and build
19+
- name: Build
3720
shell: bash
3821
run: |
39-
export GOPATH="${HOME}/go"
40-
export PATH="${GOPATH}/bin:${PATH}"
4122
make test
4223
make copy-test-files
4324
make

.github/workflows/test.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,32 @@ jobs:
88
test:
99
strategy:
1010
matrix:
11-
go-version: [1.13.x]
12-
platform: [ubuntu-18.04, macOS-10.15, windows-2019]
11+
go-version: [ '1.13', '1.16' ]
12+
platform: [ ubuntu-18.04, ubuntu-20.04, macOS-10.15, windows-2019 ]
1313
runs-on: ${{ matrix.platform }}
14-
env:
15-
GO111MODULE: "on"
1614

1715
steps:
1816
- name: Install Go
1917
uses: actions/[email protected]
2018
with:
2119
go-version: ${{ matrix.go-version }}
2220
- name: Install libgtk-3-dev
23-
if: matrix.platform == 'ubuntu-18.04'
24-
run: |
25-
sudo apt-get update -y
26-
sudo apt-get install -y libgtk-3-dev
21+
if: startsWith(matrix.platform, 'ubuntu')
22+
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev
2723
- name: Install UPX (Linux)
28-
if: matrix.platform == 'ubuntu-18.04'
29-
run: sudo apt-get update && sudo apt-get install upx-ucl
24+
if: startsWith(matrix.platform, 'ubuntu')
25+
run: sudo apt-get update -y && sudo apt-get install -y upx-ucl
3026
- name: Install UPX (Windows)
31-
if: matrix.platform == 'windows-2019'
27+
if: startsWith(matrix.platform, 'windows')
3228
run: choco install upx -y
33-
- name: Install goversioninfo
34-
shell: bash
35-
run: |
36-
export GOPATH="${HOME}/go"
37-
mkdir -p ${GOPATH}/bin
38-
mkdir -p ${GOPATH}/pkg
39-
mkdir -p ${GOPATH}/src
40-
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
4129
- name: Checkout repository
4230
uses: actions/[email protected]
43-
- name: Test and build
31+
- name: Build
4432
shell: bash
4533
run: |
46-
export GOPATH="${HOME}/go"
47-
export PATH="${GOPATH}/bin:${PATH}"
48-
make test
4934
make copy-test-files
5035
make
5136
make tools
37+
- name: Test
38+
shell: bash
39+
run: make test

0 commit comments

Comments
 (0)