Merge pull request #14 from hetznercloud/renovate/actions-setup-pytho… #57
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: CI | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install yamllint | |
run: pip3 install ansible-lint yamllint | |
- name: Lint with ansible-lint | |
run: ansible-lint -vvvvvvvvvv -R | |
molecule: | |
name: Molecule | |
permissions: | |
# Required for hetznercloud/tps-action | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install ansible and molecule | |
run: pip3 install ansible 'molecule>=6.0,<7.0' 'molecule-hetznercloud>=2.0,<3.0' | |
- uses: hetznercloud/tps-action@main | |
with: | |
token: ${{ secrets.HCLOUD_TOKEN }} | |
- name: Run molecule | |
run: | | |
molecule test | |
env: | |
PY_COLORS: "1" | |
ANSIBLE_FORCE_COLOR: "1" |