|
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 |
| - env: |
15 |
| - GO111MODULE: "on" |
16 | 14 |
|
17 | 15 | steps:
|
18 | 16 | - name: Install Go
|
19 | 17 |
|
20 | 18 | with:
|
21 | 19 | go-version: ${{ matrix.go-version }}
|
22 | 20 | - 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 |
27 | 23 | - 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 |
30 | 26 | - name: Install UPX (Windows)
|
31 |
| - if: matrix.platform == 'windows-2019' |
| 27 | + if: startsWith(matrix.platform, 'windows') |
32 | 28 | 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 | 29 | - name: Checkout repository
|
42 | 30 |
|
43 |
| - - name: Test and build |
| 31 | + - name: Build |
44 | 32 | shell: bash
|
45 | 33 | run: |
|
46 |
| - export GOPATH="${HOME}/go" |
47 |
| - export PATH="${GOPATH}/bin:${PATH}" |
48 |
| - make test |
49 | 34 | make copy-test-files
|
50 | 35 | make
|
51 | 36 | make tools
|
| 37 | + - name: Test |
| 38 | + shell: bash |
| 39 | + run: make test |
0 commit comments