ci: run 'make check' as reusable workflow (#17600)
Some of the paths ignored by `test-core.yaml` need to be checked by `make check`. The `checks.yaml` workflow run on these paths and can also be used as a reusable workflow.
This commit is contained in:
parent
d797da4a3c
commit
4b33bbd9c4
|
@ -0,0 +1,36 @@
|
|||
# Run 'make check' on paths ignored by test-core.yaml.
|
||||
name: Run checks
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'demo/**'
|
||||
- 'e2e/terraform/**'
|
||||
- 'terraform/**'
|
||||
- 'website/**'
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'release/**'
|
||||
paths:
|
||||
- 'demo/**'
|
||||
- 'e2e/terraform/**'
|
||||
- 'terraform/**'
|
||||
- 'website/**'
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
with:
|
||||
fetch-depth: 0 # needs tags for checkproto
|
||||
- uses: hashicorp/setup-golang@v1
|
||||
- name: Run make check
|
||||
run: |
|
||||
make missing
|
||||
make bootstrap
|
||||
make check
|
||||
permissions:
|
||||
contents: read
|
|
@ -57,19 +57,8 @@ jobs:
|
|||
make tidy
|
||||
make bootstrap
|
||||
checks:
|
||||
uses: ./.github/workflows/checks.yaml
|
||||
needs: [mods]
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
with:
|
||||
fetch-depth: 0 # needs tags for checkproto
|
||||
- uses: hashicorp/setup-golang@v1
|
||||
- name: Run make check
|
||||
run: |
|
||||
make missing
|
||||
make bootstrap
|
||||
make check
|
||||
compile:
|
||||
needs: [mods, checks]
|
||||
strategy:
|
||||
|
@ -129,4 +118,3 @@ jobs:
|
|||
sudo -E env "PATH=$PATH" make test-nomad
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
|
|
Loading…
Reference in New Issue