Cosmetic changes. #28
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, pull_request] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| env: | |
| GOTOOLCHAIN: go1.24.4 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.24.4' | |
| check-latest: true | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Build graft binary | |
| run: go build ./cmd/graft | |
| - name: Upload graft binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: graft-binary | |
| path: ./graft | |
| vet: | |
| name: Vet | |
| runs-on: ubuntu-latest | |
| env: | |
| GOTOOLCHAIN: go1.24.4 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.24.4' | |
| check-latest: true | |
| - name: Run go vet | |
| run: go list ./... | grep -v vendor | xargs go vet | |
| gosec: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| env: | |
| GOTOOLCHAIN: go1.24.4 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.24.4' | |
| check-latest: true | |
| - name: Run Gosec Security Scanner | |
| uses: securego/gosec@master | |
| with: | |
| args: ./... | |
| unit-tests: | |
| name: Unit Tests | |
| needs: [build, vet, gosec] | |
| runs-on: ubuntu-latest | |
| env: | |
| GOTOOLCHAIN: go1.24.4 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.24.4' | |
| check-latest: true | |
| - name: Run unit tests | |
| run: go list ./... | grep -v vendor | xargs go test | |
| integration-tests: | |
| name: Integration Tests | |
| needs: unit-tests | |
| runs-on: ubuntu-latest | |
| env: | |
| GOTOOLCHAIN: go1.24.4 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.24.4' | |
| check-latest: true | |
| - name: Download graft binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: graft-binary | |
| - name: Make graft binary executable | |
| run: chmod +x ./graft | |
| - name: Run integration tests with Docker | |
| run: | | |
| # Make integration script executable | |
| chmod +x scripts/integration | |
| # Run integration tests | |
| make integration |