-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (65 loc) · 2.09 KB
/
pre_commit_and_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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# This workflow action will run pre-commit, which will execute ansible and yaml linting
# See .pre-commit-config.yaml for what hooks are executed
name: pre-commit tests
on:
workflow_call:
inputs:
collection_namespace:
description: "Install collection python dependencies"
required: true
type: string
collection_name:
description: "Path to the collection source"
required: true
type: string
collection_version:
description: The final collection path
required: false
type: string
collection_repo:
description: The collection url
required: false
type: string
collection_dependencies:
description: The collection dependencies (as a space separated list)
required: false
type: string
jobs:
pre-commit:
uses: "redhat-cop/ansible_collections_tooling/.github/workflows/pre-commit.yml@main"
with:
collection_namespace: ${{ inputs.collection_namespace }}
collection_name: ${{ inputs.collection_name }}
collection_version: ${{ inputs.collection_version }}
collection_repo: ${{ inputs.collection_repo }}
collection_dependencies: ${{ inputs.collection_dependencies }}
sanity:
uses: "redhat-cop/ansible_collections_tooling/.github/workflows/sanity.yml@main"
with:
collection_dependencies: ${{ inputs.collection_dependencies }}
build-import:
uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/[email protected]
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.mlc_config.json'
all_green:
if: ${{ always() }}
needs:
- pre-commit
- sanity
- markdown-link-check
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
'${{ needs.pre-commit.result }}',
'${{ needs.sanity.result }}',
]) == {'success'}"
...