-
Notifications
You must be signed in to change notification settings - Fork 22
93 lines (79 loc) · 2.24 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Tests
on:
push:
branches:
- master
pull_request: {}
env:
MOLECULEW_USE_SYSTEM: 'true'
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
jobs:
test:
name: Molecule test
runs-on: ubuntu-18.04
strategy:
max-parallel: 3
matrix:
architecture:
- amd64
ansible-version:
- '2.10.7'
molecule-scenario:
- rocky
- debian-max
- debian-min
- default
- ubuntu-min
- fedora
- opensuse
include:
- architecture: arm
ansible-version: '2.10.7'
molecule-scenario: ubuntu-arm32v7
- architecture: arm64
ansible-version: '2.10.7'
molecule-scenario: ubuntu-arm64v8
- architecture: amd64
ansible-version: '2.9.18'
molecule-scenario: default
env:
MOLECULEW_ANSIBLE: ${{ matrix.ansible-version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Cache Molecule
id: molecule-cache
uses: actions/cache@v2
with:
path: ~/.moleculew
key: Ansible-${{ matrix.ansible-version }}-${{ hashFiles('.moleculew/**') }}
- name: Install dependencies
if: steps.molecule-cache.outputs.cache-hit != 'true'
run: ./moleculew wrapper-install
- name: Dependency versions
run: ./moleculew wrapper-versions
- name: Set up QEMU
if: matrix.architecture != 'amd64'
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: ${{ matrix.architecture }}
- name: Molecule test
run: ./moleculew test --scenario-name=${{ matrix.molecule-scenario }}
- name: Compact cache
if: steps.molecule-cache.outputs.cache-hit != 'true'
run: find ~/.moleculew -name '__pycache__' -exec rm -rf {} +
test-all:
if: ${{ always() }}
name: Test (matrix)
runs-on: ubuntu-18.04
needs: test
steps:
- name: Check test matrix status
run: "[[ '${{ needs.test.result }}' == 'success' ]] || exit 1"