Skip to content

chore(deps): update actions/upload-artifact digest to 5076954 #757

chore(deps): update actions/upload-artifact digest to 5076954

chore(deps): update actions/upload-artifact digest to 5076954 #757

Workflow file for this run

---
name: CI (Lint + Molecule)
"on":
workflow_dispatch:
inputs:
lint:
description: "Lint"
required: true
default: true
type: boolean
distro:
description: "Select a Distribution to run"
required: false
type: choice
default: "ubuntu2204"
options:
- ubuntu2004
- ubuntu2204
- debian11
- debian12
- rockylinux8
- rockylinux9
- fedora39
- ALL
ansible_version:
description: "Select Ansible Versions to run"
required: false
type: choice
# (minimum)
default: "ansible-6"
options:
- ansible-6,ansible-7,ansible-8,ansible-9
- ansible-7,ansible-8,ansible-9
- ansible-8,ansible-9
- ansible-6
- ansible-7
- ansible-8
- ansible-9
pull_request:
branches-ignore:
- renovate/**
paths:
- ".github/workflows/ci.yml"
- "defaults/**"
- "handlers/**"
- "meta/**"
- "molecule/**"
- "tasks/**"
- "vars/**"
- ".ansible-lint"
- ".gitattributes"
- ".yamllint"
- "pyproject.toml"
- "requirements-dev.txt"
- "requirements.yml"
- "tox.ini"
push:
branches:
- master
- renovate/**
paths:
- ".github/workflows/ci.yml"
- "defaults/*"
- "handlers/*"
- "meta/**"
- "molecule/**"
- "tasks/*"
- "vars/*"
- ".ansible-lint"
- ".gitattributes"
- ".yamllint"
- "pyproject.toml"
- "requirements.yml"
- "tox.ini"
schedule:
# At 05:00 on Sunday.
- cron: "0 5 * * 0"
permissions: read-all
jobs:
lint:
name: Lint
if: ${{ github.event.inputs.lint != 'false' }}
runs-on: ubuntu-latest
steps:
- name: check out the codebase
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: set up python 3
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: "3.10"
- name: Install yamllint package.
run: pip3 install "yamllint==1.*"
- name: Lint YAML (GitHub Annotations)
run: |
cat <<HEREDOC
Wondering about why there are no file names?
This command outputs information parsed by GitHub
to be displayed in 'Annotations' tab.
HEREDOC
yamllint . -f github
- name: Lint YAML (Standard Output)
if: always()
run: yamllint . -f standard
molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
# half length of matrix's distro list / most important:
max-parallel: 4
matrix:
distro:
# ensure diversity in first half:
- ubuntu2204
- debian12
- rockylinux9
- fedora39
# other:
- rockylinux8
- ubuntu2004
- debian11
env:
WORKFLOW_DISPATCH_IF: >-
${{github.event_name == 'workflow_dispatch' &&
(github.event.inputs.distro == 'ALL' ||
contains(matrix.distro, github.event.inputs.distro)) }}
steps:
- name: if this step is run, this is a real ci run
run: >
cat << EOF
If this step is NOT skipped, this workflow run was manually dispatched
and the chosen distro does not match the current matrix distro.
This is a hack because GitHub CI does not allow for a state other than "failed"
as per https://github.com/actions/runner/issues/662
EOF
if: github.event_name != 'workflow_dispatch' || env.WORKFLOW_DISPATCH_IF == 'true'
- name: check out the codebase
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: set up python 3
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: "3.10"
- name: setup/activate pre-commit cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
path: ~/.cache/pre-commit
key: ${{ hashFiles('**/.pre-commit-config.yaml') }}
- name: Install test dependencies.
run: pip3 install -r requirements-dev.txt
- name: Run Molecule tests (normal).
run: tox
env:
TOX_SKIP_ENV: pre-commit
MOLECULE_DISTRO: ${{ matrix.distro }}
if: github.event_name != 'workflow_dispatch'
- name: Run Molecule tests (debug).
run: tox
env:
TOXENV: py3-${{ github.event.inputs.ansible_version }}
TOX_SKIP_ENV: pre-commit
MOLECULE_DESTROY: never
MOLECULE_DISTRO: ${{ matrix.distro }}
if: env.WORKFLOW_DISPATCH_IF == 'true'
- name: Upload output of /molecule/resources/debug.yml as CI Artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
with:
name: debug-${{ matrix.distro }}.yml
path: |
/var/tmp/vars.yml
/var/tmp/environment.yml
- name: setup tmate session if previous step failed and if this is a manual run
if: failure() && env.WORKFLOW_DISPATCH_IF == 'true'
uses: mxschmitt/action-tmate@a283f9441d2d96eb62436dc46d7014f5d357ac22 # v3
timeout-minutes: 30