Bump actions/setup-python from 4 to 5 #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: {} | |
env: | |
MOLECULEW_USE_SYSTEM: 'true' | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
jobs: | |
test: | |
name: Molecule test | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
ansible-version: | |
- '2.9.26' # min-ansible-test-version | |
- '2.10.7' # max-ansible-test-version | |
env: | |
MOLECULEW_ANSIBLE: ${{ matrix.ansible-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Cache Molecule | |
id: molecule-cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.moleculew | |
key: Ansible-${{ matrix.ansible-version }}-${{ hashFiles('.moleculew/**') }} | |
- name: Install dependencies | |
if: steps.molecule-cache.outputs.cache-hit != 'true' | |
run: ./moleculew wrapper-install | |
- name: Dependency versions | |
run: ./moleculew wrapper-versions | |
- name: Login to Docker Hub | |
if: '!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Molecule test | |
run: ./moleculew test | |
- name: Compact cache | |
if: steps.molecule-cache.outputs.cache-hit != 'true' | |
run: find ~/.moleculew -name '__pycache__' -exec rm -rf {} + | |
test-all: | |
if: ${{ always() }} | |
name: Test (matrix) | |
runs-on: ubuntu-20.04 | |
needs: test | |
steps: | |
- name: Check test matrix status | |
run: "[[ '${{ needs.test.result }}' == 'success' ]] || exit 1" |