[deps] Upgraded OpenWISP modules to latest stable version #688
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: Ansible-OpenWISP2 CI Build | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
branches: | |
- master | |
- dev | |
jobs: | |
build: | |
name: Build ${{ matrix.distro }} | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: | |
- ubuntu2004 | |
- ubuntu2204 | |
- ubuntu2404 | |
- debian11 | |
- debian12 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install python dependencies | |
run: | | |
pip install molecule molecule-plugins[docker] yamllint ansible-lint docker | |
pip install openwisp-utils[qa] | |
# https://github.com/ansible-community/molecule-plugins/issues/256 | |
python -m pip install 'requests<2.32' | |
- name: Install Ansible Galaxy dependencies | |
run: ansible-galaxy collection install "community.general:>=3.6.0" | |
- name: QA checks | |
continue-on-error: true | |
run: | | |
./run-qa-checks | |
- name: Tests | |
run: | | |
mkdir -p ~/.ansible/roles | |
ln -s $GITHUB_WORKSPACE ~/.ansible/roles/openwisp.openwisp2 | |
molecule test | |
env: | |
ROLE_NAME: openwisp2 | |
PY_COLORS: '1' | |
ANSIBLE_FORCE_COLOR: '1' | |
MOLECULE_DISTRO: ${{ matrix.distro }} | |
ANSIBLE_ROLES_PATH: /home/runner/.cache/molecule/ansible-openwisp2/default/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles | |
import: | |
name: Update imports on Ansible Galaxy | |
runs-on: ubuntu-22.04 | |
container: python:3-slim | |
needs: | |
- build | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
steps: | |
- name: Install ansible | |
run: pip install ansible | |
- name: Update imports on Ansible Galaxy | |
run: | | |
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} openwisp ansible-openwisp2 |