Merge pull request #85 from michaeladler/perf/improve-n-quads #46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: . | |
| steps: | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.18 | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - id: go-cache-paths | |
| run: | | |
| echo "::set-output name=go-build::$(go env GOCACHE)" | |
| echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
| - name: Go Build Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go-cache-paths.outputs.go-build }} | |
| key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
| - name: Go Mod Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
| key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v3.3.0 | |
| with: | |
| args: "--out-${NO_FUTURE}format colored-line-number --timeout 5m" | |
| working-directory: . | |
| skip-pkg-cache: true | |
| skip-build-cache: true | |
| tidy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.18 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/.cache/go-build | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - uses: zencargo/github-action-go-mod-tidy@v1 | |
| with: | |
| path: . | |
| go-version: 1.18 | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.18 | |
| - name: Set up Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/.cache/go-build | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Test | |
| run: make test-cov | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 |