Pass all environment variables to tox. #248
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
--- | |
# | |
# Ansible managed | |
# | |
name: Ansible Molecule | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '29 15 15 * *' | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: ansible-lint | |
uses: ansible-community/ansible-lint-action@main | |
python-3-9: | |
needs: | |
- lint | |
runs-on: ubuntu-20.04 | |
container: | |
image: python:3.9 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- image: "enterpriselinux" | |
tag: "latest" | |
- image: "debian" | |
tag: "latest" | |
- image: "debian" | |
tag: "bullseye" | |
- image: "ubuntu" | |
tag: "focal" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: molecule | |
run: | | |
apt-get update -qq | |
apt-get -y -qq install yamllint docker.io | |
pip install --no-cache-dir tox | |
if [ -f tox.ini ] ; then tox ; fi | |
if [ ! -f tox.ini ] ; then pip install -r requirements.yml ; pip install ansible-lint ansible-core ; molecule test ; fi | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} | |
python-3-10: | |
needs: | |
- lint | |
runs-on: ubuntu-20.04 | |
container: | |
image: python:3.10 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- image: "enterpriselinux" | |
tag: "latest" | |
- image: "debian" | |
tag: "latest" | |
- image: "debian" | |
tag: "bullseye" | |
- image: "ubuntu" | |
tag: "focal" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: molecule | |
run: | | |
apt-get update -qq | |
apt-get -y -qq install yamllint docker.io | |
pip install --no-cache-dir tox | |
if [ -f tox.ini ] ; then tox ; fi | |
if [ ! -f tox.ini ] ; then pip install -r requirements.yml ; pip install ansible-lint ansible-core ; molecule test ; fi | |
env: | |
image: ${{ matrix.config.image }} | |
tag: ${{ matrix.config.tag }} |