generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (73 loc) · 2.96 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
---
name: Cross Platform Tests
'on':
pull_request:
push:
branches:
- main
schedule:
- cron: "0 4 * * 4"
defaults:
run:
working-directory: 'devshop.platform'
jobs:
examples:
name: "${{ matrix.job_name }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- job_name: Ubuntu 20.04
ansible_options: |
--inventory ./examples/single-site --extra-vars=devshop_host_docker_image=geerlingguy/docker-ubuntu2004-ansible
- job_name: Ubuntu 22.04
ansible_options: |
--inventory ./examples/single-site --extra-vars=devshop_host_docker_image=geerlingguy/docker-ubuntu2204-ansible
# - job_name: Ubuntu 18.04
# ansible_options: |
# --inventory ./examples/single-site --extra-vars=devshop_host_docker_image=geerlingguy/docker-ubuntu1804-ansible
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: 'devshop.platform'
- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install test dependencies.
run: |
pip3 install ansible molecule[docker] docker
bash scripts/ansible-galaxy-install.sh
# See: https://github.com/geerlingguy/ansible-role-mysql/issues/422
- name: Disable AppArmoDuring a workflow run, files are uploaded and downloaded individually using the upload-artifact and download-artifact actions. However, when a workflow run finishes and an artifact is downloaded from either the UI or through the download api, a zip is dynamically created with all the file contents that were uploaded. There is currently no way to download artifacts after a workflow run finishes in a format other than a zip or to download artifact contents individually. One of the consequences of this limitation is that if a zip is uploaded during a workflow run and then downloaded from the UI, there will be a double zip created.r on Debian.
run: |
set -x
sudo apt-get install apparmor-profiles
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
if: ${{ startsWith(matrix.distro, 'debian') }}
- name: Run d.
env:
OPTIONS: ${{ matrix.ansible_options }}
run: |
./d \
${OPTIONS}
- name: Run d again.
if: ${{ matrix.ansible_options }} and {{ always() }}
env:
OPTIONS: ${{ matrix.ansible_options }}
run: |
./d \
${OPTIONS}
- name: Upload artifacts.
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: "artifact-${{ matrix.job_name }}"
path: devshop.platform/molecule/default/artifacts