|
24 | 24 |
|
25 | 25 | jobs:
|
26 | 26 | validate:
|
27 |
| - name: Install and validate collection |
| 27 | + name: Validate collection |
28 | 28 | runs-on: ubuntu-latest
|
29 | 29 | steps:
|
30 | 30 | - name: Checkout repository
|
31 | 31 | uses: actions/checkout@v4
|
32 | 32 |
|
33 |
| - - name: Setup Python and caching |
34 |
| - uses: actions/setup-python@v4 |
| 33 | + - name: Set up Python and caching |
| 34 | + uses: actions/setup-python@v5 |
35 | 35 | with:
|
36 | 36 | python-version: "3.12"
|
37 | 37 | cache: "pip"
|
38 | 38 |
|
39 |
| - - name: Install Hatch |
40 |
| - run: | |
41 |
| - python -m pip install hatch |
| 39 | + # - name: Install Hatch |
| 40 | + # run: | |
| 41 | + # python -m pip install hatch |
42 | 42 |
|
43 | 43 | - name: Set up Ansible and Ansible collections and roles
|
44 | 44 | run: |
|
45 | 45 | sudo update-alternatives --install /usr/bin/python python $(which python3) 1
|
46 | 46 | pip install --upgrade pip
|
47 |
| - pip install ansible-core~=2.18.0 ansible-builder bindep pycodestyle voluptuous pylint pyyaml ansible-lint |
| 47 | + pip install ansible-core<2.17 ansible-builder bindep pycodestyle voluptuous pylint pyyaml ansible-lint |
| 48 | +
|
| 49 | + - name: Install Ansible collections and roles |
| 50 | + run: | |
48 | 51 | mkdir -p /usr/share/ansible/collections /usr/share/ansible/roles
|
49 | 52 | ansible-galaxy collection install -r builder/requirements.yml -p /usr/share/ansible/collections
|
50 | 53 | ansible-galaxy role install -r builder/requirements.yml -p /usr/share/ansible/roles
|
51 | 54 |
|
52 |
| - - name: Report Ansible version, collections, and roles |
53 |
| - run: | |
54 |
| - ansible --version |
55 |
| - ansible-galaxy collection list |
56 |
| - ansible-galaxy role list |
57 |
| -
|
58 | 55 | - name: Set up Ansible collection dependencies
|
59 | 56 | run: |
|
60 | 57 | ansible-builder introspect --write-pip final_python.txt --write-bindep final_bindep.txt /usr/share/ansible/collections
|
61 | 58 | [[ -f final_python.txt ]] && pip install -r final_python.txt || echo "No Python dependencies found."
|
62 | 59 | [[ -f final_bindep.txt ]] && bindep --file final_bindep.txt || echo "No system dependencies found."
|
63 | 60 |
|
| 61 | + - name: Report Ansible version, collections, and roles |
| 62 | + run: | |
| 63 | + ansible --version |
| 64 | + ansible-galaxy collection list |
| 65 | + ansible-galaxy role list |
| 66 | +
|
64 | 67 | - name: Report installed Python dependencies
|
65 | 68 | run: pip freeze
|
66 | 69 |
|
67 | 70 | - name: Validate collection
|
68 | 71 | run: |
|
69 | 72 | # pushd /usr/share/ansible/collections/ansible_collections/cloudera/cluster
|
70 | 73 | # hatch run lint
|
71 |
| - ansible-lint --no-offline |
72 |
| - #ansible-test sanity --test pep8 |
73 |
| - #ansible-test sanity --test validate-modules |
74 |
| - #ansible-test units --requirements --color yes --redact |
75 |
| - popd |
| 74 | + # ansible-lint --no-offline. # --no-offline is ignored! |
| 75 | + # ansible-test sanity --test pep8 |
| 76 | + # ansible-test sanity --test validate-modules |
| 77 | + # ansible-test units --requirements --color yes --redact |
| 78 | + # popd |
76 | 79 |
|
77 | 80 | # See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
78 | 81 | - name: Save PR number
|
|
89 | 92 | path: pr/
|
90 | 93 |
|
91 | 94 | import-galaxy:
|
| 95 | + name: Validate Galaxy import |
92 | 96 | needs: validate
|
93 | 97 | permissions:
|
94 | 98 | contents: read
|
95 |
| - name: Import collection with Galaxy importer |
96 | 99 | uses: ansible-community/github-action-test-galaxy-import/.github/workflows/test-galaxy-import.yml@main
|
0 commit comments