github.com/fastly/go-fastly/v6@v6.8.0/.github/workflows/pr_test.yml (about) 1 on: pull_request 2 name: Test 3 jobs: 4 lint: 5 runs-on: ubuntu-latest 6 steps: 7 - name: Checkout code 8 uses: actions/checkout@v2 9 - name: Install Go 10 uses: actions/setup-go@v2 11 with: 12 go-version: 1.16.x 13 - name: Restore cache 14 id: cache 15 uses: actions/cache@v2 16 with: 17 path: ~/go/bin 18 key: ${{ runner.os }}-go-bin-${{ hashFiles('**/go.sum') }} 19 restore-keys: | 20 ${{ runner.os }}-go-bin- 21 - name: Restore cache 22 uses: actions/cache@v2 23 with: 24 path: ~/go/pkg/mod 25 key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} 26 restore-keys: | 27 ${{ runner.os }}-go-mod- 28 - name: Installing necessary tools 29 run: make dev-dependencies 30 shell: bash 31 - name: Check Module 32 run: make check-mod 33 shell: bash 34 - name: Check Imports 35 run: make check-imports 36 shell: bash 37 - name: Check Fmt 38 run: make check-fmt 39 shell: bash 40 - name: Vet 41 run: make vet 42 shell: bash 43 - name: Staticcheck 44 run: make staticcheck 45 shell: bash 46 test: 47 strategy: 48 matrix: 49 go-version: [1.16.x] 50 platform: [ubuntu-latest] 51 runs-on: ${{ matrix.platform }} 52 steps: 53 - name: Checkout code 54 uses: actions/checkout@v2 55 - name: Install Go 56 uses: actions/setup-go@v2 57 with: 58 go-version: ${{ matrix.go-version }} 59 - name: Restore cache 60 uses: actions/cache@v2 61 with: 62 path: ~/go/pkg/mod 63 key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} 64 restore-keys: | 65 ${{ runner.os }}-go-mod- 66 - name: Test 67 run: make test 68 shell: bash