name: Build and Test on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: matrix: go: ["1.17", "1.16"] name: Go ${{ matrix.go }} - Build steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - uses: actions/setup-node@v2 with: node-version: "16" - uses: actions/cache@v2 with: path: | ~/.cache/go-build ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - uses: actions/cache@v2 with: path: ${{ github.workspace }}/admin/.next/cache key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} restore-keys: | ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - run: make build test: runs-on: ubuntu-latest strategy: matrix: go: ["1.17", "1.16"] name: Go ${{ matrix.go }} - Test steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - uses: actions/cache@v2 with: path: | ~/.cache/go-build ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - run: go test ./pkg/...