name: Build and Test Cache Module on: pull_request: types: [opened, reopened, synchronize] paths: - 'cache/**' push: branches: [dev, main] paths: - 'cache/**' jobs: build_test: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: go-version-file: "./cache/go.mod" - name: Build working-directory: ./cache run: go build -x - name: Test working-directory: ./cache run: go test -race -v ./... - name: Lint # lint even when a previous step failed if: ${{!cancelled()}} uses: golangci/golangci-lint-action@v3 with: working-directory: ./cache version: v1.52 args: -v