-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (49 loc) · 1.52 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
name: Ansible WireGuard OpenWISP CI Build
on: # yamllint disable-line rule:truthy
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build ${{ matrix.distro }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu2004
ansible_interpreter: /usr/bin/python3
- distro: ubuntu2204
ansible_interpreter: /usr/bin/python3
- distro: debian11
ansible_interpreter: /usr/bin/python3
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install python dependencies
run: |
pip install -U pip wheel setuptools
pip install molecule molecule-plugins[docker] yamllint ansible-lint docker
pip install openwisp-utils[qa]
- name: Install Ansible Galaxy dependencies
run: ansible-galaxy collection install "community.general:>=3.6.0"
- name: QA checks
run: |
openwisp-qa-check --skip-isort --skip-flake8 --skip-checkmigrations --skip-black
- name: Tests
run: molecule test
env:
ROLE_NAME: openwisp2
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
ANSIBLE_PYTHON_INTERPRETER: ${{ matrix.ansible_interpreter }}