-
Notifications
You must be signed in to change notification settings - Fork 17
61 lines (48 loc) · 1.48 KB
/
main.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
---
name: CI
on: # yamllint disable-line rule:truthy
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 0' # run every Sunday
workflow_dispatch: ~
jobs:
build:
runs-on: ubuntu-latest
env:
driver: docker
role_name: nkakouros.easyrsa
strategy:
matrix:
distro:
- image: geerlingguy/docker-ubuntu1804-ansible:latest
instance_name: ubuntu1804-molecule
- image: carlodepieri/docker-archlinux-ansible
instance_name: archlinux-molecule
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/[email protected]
- name: Install molecule
run: pip3 install ansible-lint molecule molecule-${{ env.driver }} ${{ env.driver }} flake8
- name: Get linter-config repo
uses: actions/checkout@v3
with:
repository: nkakouros-original/linter-configs
path: linter-configs
- name: Copy linter configs in place
run: >-
cp -r
${{ github.workspace }}/linter-configs/configs/.
${{ github.workspace }}/;
rm -rf linter-configs;
- name: Run molecule
run: molecule -c molecule.yml test
env:
CUSTOM_MOLECULE_CONTAINER_IMAGE: ${{ matrix.distro.image }}
CUSTOM_MOLECULE_INSTANCE_NAME: ${{ env.role_name}}-${{ matrix.distro.instance_name }}
CUSTOM_MOLECULE_DRIVER: ${{ env.driver }}