forked from containers/nri-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: split verification to multiple jobs.
Signed-off-by: Krisztian Litkey <[email protected]>
- Loading branch information
Showing
2 changed files
with
92 additions
and
67 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Verify | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "release-*" | ||
- "test/**" | ||
pull_request: | ||
branches: | ||
- main | ||
- "release-*" | ||
|
||
env: | ||
GO_VERSION: "1.22.1" | ||
|
||
jobs: | ||
verify-deps: | ||
name: Dependencies | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: | | ||
make verify-godeps | ||
verify-formatting: | ||
name: Formatting | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: | | ||
if ! git diff-index --check origin/${{ github.base_ref }} --; then | ||
echo "This PR would introduce the errors shown above." | ||
echo "Please fix them and update the PR." | ||
exit 1 | ||
fi | ||
if: ${{ github.event_name == 'pull_request' }} | ||
- run: | | ||
make verify-fmt | ||
verify-generated: | ||
name: Generated Assets | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: | | ||
make verify-generate | ||
verify-build: | ||
name: Builds | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
feth-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: | | ||
make verify-build | ||
verify-docs: | ||
name: Documentation | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
feth-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: | | ||
pip3 install --user -r docs/requirements.txt | ||
echo "`python3 -m site --user-base`/bin" >> $GITHUB_PATH | ||
- run: | | ||
git config user.name "Github" | ||
git config user.email "[email protected]" | ||
./scripts/build/update-gh-pages.sh |