Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit dc76c2c

Browse files
committed
update ci
1 parent ea37a35 commit dc76c2c

File tree

4 files changed

+84
-7
lines changed

4 files changed

+84
-7
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
name: Integration-Tests
4+
5+
on:
6+
# schedule:
7+
# - cron: "33 6 * * *"
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 1
14+
env:
15+
CI_JOB: 'ansible-test-molecule-${{ github.event.repository.name }}'
16+
CI_DOMAIN: 'ci.ansibleguy.net'
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
ref: ${{ github.ref }}
23+
24+
- name: Install dependencies
25+
run: sudo apt install curl jq
26+
shell: bash
27+
28+
- name: Pulling logs
29+
run: curl https://${{ env.CI_DOMAIN }}/api/job/${{ env.CI_JOB }}/logs?token=${{ secrets.CI_TOKEN_RO }} | jq > /tmp/test.log
30+
shell: bash
31+
32+
- uses: actions/upload-artifact@v4
33+
with:
34+
name: test-logs
35+
path: /tmp/test.log
36+
retention-days: 14
37+
38+
- name: Checking job-state
39+
run: >
40+
curl https://${{ env.CI_DOMAIN }}/api/job/${{ env.CI_JOB }}/state?token=${{ secrets.CI_TOKEN_RO }} | jq -r '.state' | grep -q 'failed' && exit 1 || exit 0
41+
shell: bash
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
3+
name: Integration-Tests Execution
4+
5+
on: workflow_dispatch
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 1
11+
env:
12+
CI_JOB: 'ansible-test-molecule-${{ github.event.repository.name }}'
13+
CI_DOMAIN: 'ci.ansibleguy.net'
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
ref: ${{ github.ref }}
20+
21+
- name: Install dependencies
22+
run: sudo apt install curl
23+
shell: bash
24+
25+
- name: Starting Tests
26+
run: curl -XPOST https://${{ env.CI_DOMAIN }}/api/job/${{ env.CI_JOB }}?token=${{ secrets.CI_TOKEN_RW }}
27+
shell: bash
28+
29+
- name: You can pull the current logs at this URL
30+
run: >
31+
echo "You can pull the current logs at this URL:"
32+
echo " > https://${{ env.CI_DOMAIN }}/api/job/${{ env.CI_JOB }}/tail?token=${CI_TOKEN_RO}"
33+
env:
34+
CI_TOKEN_RO: "2b7bba30-9a37-4b57-be8a-99e23016ce70"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- 'requirements_lint.txt'
2020

2121
jobs:
22-
build:
22+
lint:
2323
runs-on: ubuntu-latest
2424
timeout-minutes: 2
2525
steps:

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ Role to deploy [MailCow dockerized](https://github.com/mailcow/mailcow-dockerize
88

99
This role follows the official [installation instructions](https://mailcow.github.io/mailcow-dockerized-docs/de/i_u_m/i_u_m_install/).
1010

11-
12-
[![Molecule Test Status](https://badges.ansibleguy.net/sw_mailcow.molecule.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/molecule.sh.j2)
13-
[![YamlLint Test Status](https://badges.ansibleguy.net/sw_mailcow.yamllint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/yamllint.sh.j2)
14-
[![PyLint Test Status](https://badges.ansibleguy.net/sw_mailcow.pylint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/pylint.sh.j2)
15-
[![Ansible-Lint Test Status](https://badges.ansibleguy.net/sw_mailcow.ansiblelint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/ansiblelint.sh.j2)
11+
[![Lint](https://github.com/ansibleguy/sw_mailcow/actions/workflows/lint.yml/badge.svg)](https://github.com/ansibleguy/sw_mailcow/actions/workflows/lint.yml)
1612
[![Ansible Galaxy](https://badges.ansibleguy.net/galaxy.badge.svg)](https://galaxy.ansible.com/ui/standalone/roles/ansibleguy/sw_mailcow)
1713

18-
Molecule Logs: [Short](https://badges.ansibleguy.net/log/molecule_sw_mailcow_test_short.log), [Full](https://badges.ansibleguy.net/log/molecule_sw_mailcow_test.log)
14+
**Molecule Integration-Tests**:
15+
16+
* Status: [![Molecule Test Status](https://badges.ansibleguy.net/sw_mailcow.molecule.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/molecule.sh.j2) |
17+
[![Functional-Tests](https://github.com/ansibleguy/sw_mailcow/actions/workflows/integration_test_result.yml/badge.svg)](https://github.com/ansibleguy/sw_mailcow/actions/workflows/integration_test_result.yml)
18+
* Logs: [API](https://ci.ansibleguy.net/api/job/ansible-test-molecule-sw_mailcow/logs?token=2b7bba30-9a37-4b57-be8a-99e23016ce70&lines=1000) | [Short](https://badges.ansibleguy.net/log/molecule_sw_mailcow_test_short.log) | [Full](https://badges.ansibleguy.net/log/molecule_sw_mailcow_test.log)
19+
20+
Internal CI: [Tester Role](https://github.com/ansibleguy/_meta_cicd) | [Jobs API](https://github.com/O-X-L/github-self-hosted-jobs-systemd)
1921

2022
**Tested:**
2123
* Debian 11

0 commit comments

Comments
 (0)