-
-
Notifications
You must be signed in to change notification settings - Fork 74
102 lines (94 loc) · 2.79 KB
/
e2e.yaml
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
94
95
96
97
98
99
100
101
102
---
name: E2E Tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
paths-ignore:
- .circlecli/**
- meta/**
- .gitignore
- .markdownlint.yml
- .yamllint
- ansible.cfg.galaxy
- CHANGELOG.md
- LICENSE
- poetry.lock
- pyproject.toml
- README.md
- Vagrantfile
push:
branches:
- master
- ansible-molecule-4
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
env:
PY_COLORS: true
ANSIBLE_FORCE_COLOR: true
MOLECULE_DEBUG: false
MOLECULE_VERBOSITY: 0
MOLECULE_NO_LOG: true
MOLECULE_VERSION: "3.6.1"
MOLECULE_DOCKER_VERSION: "1.1.0"
concurrency:
group: e2e
cancel-in-progress: false
jobs:
molecule:
runs-on: ubuntu-20.04
strategy:
max-parallel: 2
fail-fast: false
matrix:
st2_repo:
- stable
- unstable
os:
- rockylinux8
- ubuntu20
ansible-core:
- "2.11.12"
# Only run centos7 for stable, as not valid for new release
include:
- st2_repo: stable
os: centos7
ansible-core: 2.11.12
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade "requests<=2.29.0"
python3 -m pip install --upgrade ansible-core==${{ matrix.ansible-core }}
python3 -m pip install --upgrade molecule==${{ env.MOLECULE_VERSION }}
python3 -m pip install --upgrade molecule-docker==${{ env.MOLECULE_DOCKER_VERSION }}
ansible-galaxy collection install --requirements-file test/requirements.yml
- name: Molecule test ${{ matrix.st2_repo }} ${{ matrix.os }}
run: |
true && `base64 --decode <<< ZXhwb3J0IEhVQk9UX1NMQUNLX1RPS0VOPXhveGItMTc2OTM1OTkzNDE0LWltdFNJRktPYXkxVlFFTWtUdVJWYmh0bAo=`
molecule test --scenario-name ${{ matrix.os }}
env:
ST2_REPO: ${{ matrix.st2_repo }}
slack-notification:
name: Slack notification for failed master builds
if: always()
needs: [molecule]
runs-on: ubuntu-20.04
steps:
- name: Workflow conclusion
# this step creates an environment variable WORKFLOW_CONCLUSION and is the most reliable way to check the status of previous jobs
uses: technote-space/workflow-conclusion-action@v3
- name: CI Run Failure Slack Notification
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' && github.ref == 'refs/heads/master' }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ansible
status: FAILED
color: danger