Skip to content

Fix the failed CI test #27

Fix the failed CI test

Fix the failed CI test #27

Workflow file for this run

name: CI
"on":
push:
branches: [master]
tags:
- 'v*'
pull_request:
env:
galaxy-name: "marvel-nccr.ubuntu_desktop"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/action@v3.0.0
molecule:
strategy:
matrix:
distro: [ubuntu1804, ubuntu2004, ubuntu2204]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.galaxy-name }}
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install requirements
run: |
pip install --upgrade pip
pip install -r requirements.txt
working-directory: ${{ env.galaxy-name }}
- name: Install role from local directory
run: ansible-galaxy install -p . ${{ env.galaxy-name }}
working-directory: ${{ env.galaxy-name }}
- name: Run molecule
run: molecule test
working-directory: ${{ env.galaxy-name }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}
release:
name: Publish to ansible-galaxy
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: [pre-commit]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: robertdebock/galaxy-action@1.2.1
with:
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}