Pin python dependencies and optimize GitHub Actions

Signed-off-by: Martin Schurz <[email protected]>
This commit is contained in:
Martin Schurz committed 2024-10-21 20:01:14 +02:00
1 parent 7dab72c8c1
commit 45193e9ff1
9 files changed
+40 -66

No files matched your search

+4 -9
View File
@@ -59,17 +59,14 @@ jobs:
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: 3.12
cache: 'pip'
- name: Install dependencies
run: |
sudo apt install git
python -m pip install --no-cache-dir --upgrade pip
pip install -r requirements.txt
run: pip install -r requirements.txt
working-directory: ansible_collections/devsec/hardening
- name: Downgrade Ansible for Rocky 8 tests
run: |
pip install "ansible-core<2.17"
run: pip install "ansible-core<2.17"
working-directory: ansible_collections/devsec/hardening
if: matrix.molecule_distro == 'rocky8'
@@ -85,9 +82,7 @@ jobs:
/home/runner/.ansible/roles
- name: Test with molecule
run: |
molecule --version
molecule test -s nginx_hardening
run: molecule test -s nginx_hardening
env:
MOLECULE_DISTRO: ${{ matrix.molecule_distro }}
working-directory: ansible_collections/devsec/hardening