forked from operator-framework/operator-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.37 KB
/
test-sanity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: sanity
on:
pull_request: {}
jobs:
check_docs_only:
name: check_docs_only
runs-on: ubuntu-22.04
outputs:
skip: ${{ steps.check_docs_only.outputs.skip }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: check_docs_only
# Since PR's are squashed prior to merging to the branch checked out (default branch),
# HEAD^ will resolve to the previous point in history.
run: |
REF="HEAD^"
[[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2)
echo "skip=$(.github/workflows/check-docs-only.sh $REF)" >> $GITHUB_OUTPUT
sanity:
name: sanity
runs-on: ubuntu-22.04
needs: check_docs_only
if: needs.check_docs_only.outputs.skip != 'true'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
id: go
- run: sudo rm -rf /usr/local/bin/kustomize
- run: make test-sanity
docs:
name: docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- run: make test-docs
- uses: gaurav-nelson/[email protected]
with:
max-depth: 1
config-file: '.github/workflows/markdown-link-check-config.json'