|
| 1 | +--- |
| 2 | +name: Go |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + pull_request: |
| 7 | + branches: [master] |
| 8 | + |
| 9 | +env: |
| 10 | + # Minimum supported Go toolchain |
| 11 | + ACTION_MINIMUM_TOOLCHAIN: "1.12" |
| 12 | + |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + name: "Build" |
| 16 | + runs-on: ubuntu-latest |
| 17 | + continue-on-error: true |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + go: ['1.14', '1.15'] |
| 21 | + steps: |
| 22 | + - name: Install libsystemd-dev |
| 23 | + run: sudo apt-get install libsystemd-dev |
| 24 | + - uses: actions/checkout@v2 |
| 25 | + - name: Setup go |
| 26 | + uses: actions/setup-go@v1 |
| 27 | + with: |
| 28 | + go-version: ${{ matrix.go }} |
| 29 | + - name: Go fmt |
| 30 | + run: ./scripts/travis/pr-test.sh go_fmt |
| 31 | + - name: Go build (source) |
| 32 | + run: ./scripts/travis/pr-test.sh build_source |
| 33 | + - name: Go build (tests) |
| 34 | + run: ./scripts/travis/pr-test.sh build_tests |
| 35 | + - name: Go vet |
| 36 | + run: ./scripts/travis/pr-test.sh go_vet |
| 37 | + build-minimum: |
| 38 | + name: "Build on minimum supported toolchain" |
| 39 | + runs-on: ubuntu-latest |
| 40 | + continue-on-error: true |
| 41 | + steps: |
| 42 | + - name: Install libsystemd-dev |
| 43 | + run: sudo apt-get install libsystemd-dev |
| 44 | + - uses: actions/checkout@v2 |
| 45 | + - name: Setup go |
| 46 | + uses: actions/setup-go@v1 |
| 47 | + with: |
| 48 | + go-version: ${{ env['ACTION_MINIMUM_TOOLCHAIN'] }} |
| 49 | + - name: Go fmt |
| 50 | + run: ./scripts/travis/pr-test.sh go_fmt |
| 51 | + - name: Go build (source) |
| 52 | + run: ./scripts/travis/pr-test.sh build_source |
| 53 | + - name: Go build (tests) |
| 54 | + run: ./scripts/travis/pr-test.sh build_tests |
| 55 | + - name: Go vet |
| 56 | + run: ./scripts/travis/pr-test.sh go_vet |
0 commit comments