Repository navigation
Project Validator #559
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: Project Validator | |
| on: | |
| schedule: | |
| # Run daily at 9 AM UTC | |
| - cron: '0 9 * * *' | |
| push: | |
| paths: | |
| - 'utilities/dot-project/**' | |
| - 'utilities/dot-project/example/**' | |
| pull_request: | |
| paths: | |
| - 'utilities/dot-project/**' | |
| - 'utilities/dot-project/example/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: utilities/dot-project/go.mod | |
| - name: Cache validation results | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: utilities/dot-project/.cache | |
| key: ${{ runner.os }}-validator-cache-${{ hashFiles('utilities/dot-project/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-validator-cache- | |
| - name: Vet | |
| working-directory: utilities/dot-project/ | |
| run: go vet ./... | |
| - name: Run tests | |
| working-directory: utilities/dot-project/ | |
| run: | | |
| go test -v -coverprofile=coverage.out | |
| go tool cover -func=coverage.out | |
| - name: Build validator | |
| working-directory: utilities/dot-project/ | |
| run: go build ./cmd/validator | |
| - name: Run Validator | |
| working-directory: utilities/dot-project/ | |
| run: | | |
| # Re-run validator to get exit code | |
| ./validator --config example/projectlist.yaml --maintainers example/maintainers.yaml --verify-maintainers | |
| env: | |
| REPO_ROOT: ${{ github.workspace }} | |
| MAINTAINER_API_ENDPOINT: https://api-gw.platform.linuxfoundation.org/ | |
| MAINTAINER_API_STUB: "true" |