Remove unused YAML library files and update module dependencies #18
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: Go Build and Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Verify dependencies and vendoring | |
| run: | | |
| go mod tidy | |
| go mod vendor | |
| # This step fails if go.mod, go.sum, or the vendor directory are not up-to-date | |
| git diff --exit-code | |
| - name: Lint code | |
| uses: golangci/golangci-lint-action@v3 | |
| with: | |
| version: v1.55 | |
| - name: Build | |
| # Use -mod=vendor to ensure the build uses the vendored dependencies | |
| run: go build -mod=vendor -v -o arch-sandbox . | |
| - name: Test | |
| # Use -mod=vendor for tests as well | |
| run: go test -mod=vendor -v ./... | |