|
| 1 | +name: Go Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + |
| 11 | + full-test: |
| 12 | + name: Full SDK and tools test |
| 13 | + # Tests for activily maintained Go versions. |
| 14 | + runs-on: ${{ matrix.os }} |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 18 | + go-version: |
| 19 | + - 1.15.x |
| 20 | + - 1.16.x |
| 21 | + steps: |
| 22 | + - name: Setup Go |
| 23 | + uses: actions/setup-go@v2 |
| 24 | + with: |
| 25 | + go-version: ${{ matrix.go-version }} |
| 26 | + |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v2 |
| 29 | + with: |
| 30 | + fetch-depth: 1 |
| 31 | + |
| 32 | + - name: Test |
| 33 | + shell: bash |
| 34 | + run: | |
| 35 | + if [ "${{ matrix.os }}" == "windows-latest" ]; then |
| 36 | + make unit-no-verify |
| 37 | + else |
| 38 | + make get-deps-verify ci-test |
| 39 | + fi |
| 40 | +
|
| 41 | + deprecated-go-module-tests: |
| 42 | + needs: full-test |
| 43 | + name: Deprecated Go versions with module support |
| 44 | + # Tests for deprecated Go versions with module support |
| 45 | + runs-on: ${{ matrix.os }} |
| 46 | + strategy: |
| 47 | + matrix: |
| 48 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 49 | + go-version: |
| 50 | + - 1.12.x |
| 51 | + - 1.13.x |
| 52 | + - 1.14.x |
| 53 | + steps: |
| 54 | + - name: Setup Go |
| 55 | + uses: actions/setup-go@v2 |
| 56 | + with: |
| 57 | + go-version: ${{ matrix.go-version }} |
| 58 | + |
| 59 | + - name: Checkout |
| 60 | + uses: actions/checkout@v2 |
| 61 | + with: |
| 62 | + fetch-depth: 1 |
| 63 | + |
| 64 | + - name: Test |
| 65 | + shell: bash |
| 66 | + run: make unit-old-go-race-cover |
| 67 | + |
| 68 | + deprecated-pre-go-module-tests: |
| 69 | + needs: full-test |
| 70 | + name: Deprecated Go versions without module support |
| 71 | + # Tests for deprecated Go versions without module support |
| 72 | + # |
| 73 | + # setup-go doesn't play well with old Go versions that need GOPATH |
| 74 | + # * https://github.com/actions/setup-go/issues/14 |
| 75 | + # * https://github.com/actions/setup-go/issues/12 |
| 76 | + runs-on: ${{ matrix.os }} |
| 77 | + strategy: |
| 78 | + matrix: |
| 79 | + os: [ubuntu-latest, macos-latest] |
| 80 | + go-version: |
| 81 | + - 1.5.x |
| 82 | + - 1.6.x |
| 83 | + - 1.7.x |
| 84 | + - 1.8.x |
| 85 | + - 1.9.x |
| 86 | + - 1.10.x |
| 87 | + - 1.11.x |
| 88 | + - 1.12.x |
| 89 | + exclude: |
| 90 | + - os: macos-latest |
| 91 | + go-version: 1.5.x |
| 92 | + - os: macos-latest |
| 93 | + go-version: 1.6.x |
| 94 | + include: |
| 95 | + - os: windows-latest |
| 96 | + go-version: 1.12.x |
| 97 | + steps: |
| 98 | + - name: Setup Go env |
| 99 | + shell: bash |
| 100 | + run: | |
| 101 | + echo "GOPATH=${{ github.workspace }}/go" >> $GITHUB_ENV |
| 102 | + echo "${{ github.workspace }}/go/bin" >> $GITHUB_PATH |
| 103 | +
|
| 104 | + - name: Setup Go |
| 105 | + uses: actions/setup-go@v2 |
| 106 | + with: |
| 107 | + go-version: ${{ matrix.go-version }} |
| 108 | + |
| 109 | + - name: Checkout |
| 110 | + uses: actions/checkout@v2 |
| 111 | + with: |
| 112 | + fetch-depth: 1 |
| 113 | + path: go/src/github.com/aws/aws-sdk-go |
| 114 | + |
| 115 | + - name: Test |
| 116 | + shell: bash |
| 117 | + working-directory: go/src/github.com/aws/aws-sdk-go |
| 118 | + run: make get-deps unit-old-go-race-cover |
0 commit comments