name: build on: push: branches: [main] tags: ["*"] pull_request: branches: [main] jobs: build: runs-on: ubuntu-latest steps: - name: set up go 1.19 uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version: 1.19 id: go - name: checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: build, test and generate coverage report run: | go test -timeout=60s -race -v ./... -coverprofile=coverage.out go build -race ./... - name: build and test ARC working-directory: ./arc run: | go test -timeout=60s -race go build -race - name: Upload the coverage report uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: path: coverage.out name: Coverage-report - name: Display the coverage report run: go tool cover -func=coverage.out - name: install golangci-lint run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.53.3 - name: run golangci-lint run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./... ./simplelru/... ./expirable/... - name: run golangci-lint on ARC working-directory: ./arc run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./...