mirror of
https://github.com/linka-cloud/d2vm.git
synced 2024-11-22 15:56:24 +00:00
actions: move docs test to its own job
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
3f7b5e2805
commit
f9aebd77d4
31
.github/workflows/ci.yaml
vendored
31
.github/workflows/ci.yaml
vendored
@ -45,6 +45,35 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make tests
|
run: make tests
|
||||||
|
|
||||||
|
docs-up-to-date:
|
||||||
|
name: Docs up to date
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
# fetching all tags is required for the Makefile to compute the right version
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
|
||||||
|
- name: Share cache with other actions
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/go/pkg/mod
|
||||||
|
/tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-tests-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-tests-
|
||||||
|
|
||||||
|
- name: Check if docs are up to date
|
||||||
|
run: make docs-up-to-date
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -155,6 +184,7 @@ jobs:
|
|||||||
if: startsWith(github.event.ref, 'refs/tags/v')
|
if: startsWith(github.event.ref, 'refs/tags/v')
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
|
- docs-up-to-date
|
||||||
- build
|
- build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -202,6 +232,7 @@ jobs:
|
|||||||
if: startsWith(github.event.ref, 'refs/tags/v')
|
if: startsWith(github.event.ref, 'refs/tags/v')
|
||||||
needs:
|
needs:
|
||||||
- tests
|
- tests
|
||||||
|
- docs-up-to-date
|
||||||
- build-image
|
- build-image
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
2
Makefile
2
Makefile
@ -65,6 +65,8 @@ docker-run:
|
|||||||
tests:
|
tests:
|
||||||
@go generate ./...
|
@go generate ./...
|
||||||
@go list ./...| xargs go test -exec sudo -count=1 -timeout 20m -v
|
@go list ./...| xargs go test -exec sudo -count=1 -timeout 20m -v
|
||||||
|
|
||||||
|
docs-up-to-date:
|
||||||
@$(MAKE) docs
|
@$(MAKE) docs
|
||||||
@git diff --quiet docs || (echo "Please regenerate the documentation with 'make docs'"; exit 1)
|
@git diff --quiet docs || (echo "Please regenerate the documentation with 'make docs'"; exit 1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user