Add classad insert methods #15
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.21', '1.22', '1.23'] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Install goyacc | |
| run: go install golang.org/x/tools/cmd/goyacc@latest | |
| - name: Generate parser | |
| run: | | |
| export PATH=$PATH:$(go env GOPATH)/bin | |
| goyacc -o parser/y.go -p yy parser/classad.y | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Run tests | |
| run: go test -v -race -coverprofile=coverage.out ./... | |
| - name: Upload coverage to Codecov | |
| if: matrix.go-version == '1.23' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.out | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Install goyacc | |
| run: go install golang.org/x/tools/cmd/goyacc@latest | |
| - name: Generate parser | |
| run: | | |
| export PATH=$PATH:$(go env GOPATH)/bin | |
| goyacc -o parser/y.go -p yy parser/classad.y | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run go fmt | |
| run: | | |
| if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then | |
| echo "Go code is not formatted:" | |
| gofmt -s -d . | |
| exit 1 | |
| fi | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v4 | |
| with: | |
| version: latest | |
| skip-cache: true |