-
-
Notifications
You must be signed in to change notification settings - Fork 20
70 lines (68 loc) · 1.76 KB
/
test.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
name: Test
on:
push:
branches:
- '*'
tags:
- 'v*.*.*'
pull_request:
branches:
- '*'
release:
types:
- published
jobs:
changes:
name: Detect file changes
runs-on: ubuntu-22.04
outputs:
scenario: ${{ steps.filter.outputs.changes }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Detect changes
uses: dorny/[email protected]
id: filter
with:
filters: |
default:
- roles/server/**/!(**.md)
- molecule/default/**
- .github/workflows/test.yml
test:
name: "Test scenario ${{ matrix.scenario }} on ${{ matrix.os }}"
runs-on: ubuntu-22.04
needs: changes
if: ${{ needs.changes.outputs.scenario != '[]' && needs.changes.outputs.scenario != '' }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu2204
- ubuntu2004
- debian12
- debian11
- fedora37
- fedora38
- rockylinux8
- rockylinux9
scenario: ${{ fromJSON(needs.changes.outputs.scenario) }}
steps:
- name: Checkout
uses: actions/[email protected]
with:
path: ansible_collections/vladgh/samba
- name: Molecule test
uses: gofrolist/[email protected]
with:
molecule_command: test
molecule_options: --debug
molecule_args: --scenario-name ${{ matrix.scenario }}
molecule_working_dir: ansible_collections/vladgh/samba
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
MOLECULE_DISTRO: ${{ matrix.os }}
# continue-on-error: true
# - name: Debugging with tmate
# uses: mxschmitt/[email protected]