test: upgrade molecule-hetznercloud to v2 #46
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: CI | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
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@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install ansible and molecule | |
run: pip3 install ansible "molecule>=6.0,<7" "https://github.com/jooola/molecule-hetznercloud/archive/main.zip" | |
- uses: hetznercloud/tps-action@main | |
with: | |
token: ${{ secrets.HCLOUD_TOKEN }} | |
- name: Run molecule | |
run: | | |
molecule test | |
env: | |
PY_COLORS: "1" | |
ANSIBLE_FORCE_COLOR: "1" |