Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build

on:
pull_request:
paths-ignore:
- '**/*.md'
push:
branches:
- master
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,24 @@ permissions:
contents: read

jobs:
pre-check:
Comment thread
galargh marked this conversation as resolved.
name: Check (precheck)
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
outputs:
skip_checks: ${{ steps.changes.outputs.nonMarkdownFiles == 'false' }}
steps:
- uses: actions/checkout@v4
- id: changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
filters: |
nonMarkdownFiles:
- '!**/*.md'
check-gen:
name: Check (gen-check)
needs: [pre-check]
if: ${{ needs.pre-check.outputs.skip_checks != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -37,6 +53,8 @@ jobs:
- run: git diff --exit-code
check-lint:
name: Check (lint-all)
needs: [pre-check]
if: ${{ needs.pre-check.outputs.skip_checks != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -49,6 +67,8 @@ jobs:
- run: make lint
check-fmt:
name: Check (gofmt)
needs: [pre-check]
if: ${{ needs.pre-check.outputs.skip_checks != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -60,6 +80,8 @@ jobs:
- run: git diff --exit-code
check-mod-tidy:
name: Check (mod-tidy-check)
needs: [pre-check]
if: ${{ needs.pre-check.outputs.skip_checks != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -69,3 +91,17 @@ jobs:
- uses: ./.github/actions/install-go
- run: go mod tidy -v
- run: git diff --exit-code
post-check:
Comment thread
galargh marked this conversation as resolved.
name: Check (postcheck)
needs: [check-gen, check-lint, check-fmt, check-mod-tidy]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- env:
failure: ${{ needs.check-gen.result == 'failure' || needs.check-lint.result == 'failure' || needs.check-fmt.result == 'failure' || needs.check-mod-tidy.result == 'failure' }}
run: |
if [[ "$failure" == "true" ]]; then
echo "Some checks failed, see the workflow results for more information."
exit 1
fi
shell: bash
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- master
- release/v*
- release/miner/v*
paths-ignore:
- '**/*.md'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Test

on:
pull_request:
paths-ignore:
- '**/*.md'
push:
branches:
- master
Expand Down