-
Notifications
You must be signed in to change notification settings - Fork 10
69 lines (65 loc) · 1.98 KB
/
molecule.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
60
61
62
63
64
65
66
67
68
69
---
name: molecule_tests
on:
push:
pull_request:
workflow_dispatch:
schedule: # run weekly, every monday 01:00
- cron: "0 1 * * 1"
permissions: {}
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
include:
- molecule_distro: "rockylinux:9"
experimental: false
- molecule_distro: "rockylinux:8"
experimental: false
- molecule_distro: "ubuntu:22.04"
experimental: false
- molecule_distro: "ubuntu:20.04"
experimental: false
- molecule_distro: "debian:11"
experimental: false
env:
ANSIBLE_CALLBACKS_ENABLED: profile_tasks
MOLECULE_NO_LOG: "false"
ANSIBLE_ROLE: mdsketch.teleport
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.ANSIBLE_ROLE }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install molecule molecule-plugins docker ansible-lint flake8 testinfra ansible
# Workaround for https://github.com/docker/docker-py/issues/3113
pip install "urllib3<2"
mkdir -p $HOME/.ansible/roles && ln -s $GITHUB_WORKSPACE/$ANSIBLE_ROLE $HOME/.ansible/roles/
- name: Environment
run: |
pwd
env
find -ls
- name: Galaxy dependencies
run: |
cd $GITHUB_WORKSPACE/$ANSIBLE_ROLE && ansible-galaxy install --timeout 120 --verbose -r molecule/default/requirements.yml
continue-on-error: true
- name: run test
run: |
cd $GITHUB_WORKSPACE/$ANSIBLE_ROLE && molecule test
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
MOLECULE_DISTRO: ${{ matrix.molecule_distro }}