|
8 | 8 | test:
|
9 | 9 | strategy:
|
10 | 10 | 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 ] |
13 | 13 | runs-on: ${{ matrix.platform }}
|
14 | 14 | env:
|
15 |
| - GO111MODULE: "on" |
| 15 | + GOPATH: "${HOME}/go" |
| 16 | + PATH: "${PATH}:${GOPATH}/bin" |
16 | 17 |
|
17 | 18 | steps:
|
18 | 19 | - name: Install Go
|
19 | 20 |
|
20 | 21 | with:
|
21 | 22 | go-version: ${{ matrix.go-version }}
|
22 | 23 | - 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 |
| 24 | + if: startsWith(matrix.os, 'ubuntu') |
| 25 | + run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev |
27 | 26 | - name: Install UPX (Linux)
|
28 |
| - if: matrix.platform == 'ubuntu-18.04' |
29 |
| - run: sudo apt-get update && sudo apt-get install upx-ucl |
| 27 | + if: startsWith(matrix.os, 'ubuntu') |
| 28 | + run: sudo apt-get update -y && sudo apt-get install -y upx-ucl |
30 | 29 | - name: Install UPX (Windows)
|
31 |
| - if: matrix.platform == 'windows-2019' |
| 30 | + if: startsWith(matrix.os, 'windows') |
32 | 31 | 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 |
41 | 32 | - name: Checkout repository
|
42 | 33 |
|
43 |
| - - name: Test and build |
| 34 | + - name: Build |
44 | 35 | shell: bash
|
45 | 36 | run: |
|
46 |
| - export GOPATH="${HOME}/go" |
47 |
| - export PATH="${GOPATH}/bin:${PATH}" |
48 |
| - make test |
49 | 37 | make copy-test-files
|
50 | 38 | make
|
51 | 39 | make tools
|
| 40 | + - name: Test |
| 41 | + shell: bash |
| 42 | + run: | |
| 43 | + make test |
0 commit comments