File tree Expand file tree Collapse file tree 3 files changed +85
-2
lines changed Expand file tree Collapse file tree 3 files changed +85
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ name : Functional-Tests
4
+
5
+ on :
6
+ schedule :
7
+ - cron : " 38 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-collection-systemd'
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 -f 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 : curl -f 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
40
+ shell : bash
Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ name : Functional-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-collection-systemd'
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"
Original file line number Diff line number Diff line change 1
1
# Ansible Collection - ansibleguy.systemd
2
2
3
- <!-- [](https://github.com/ansibleguy/collection_systemd/blob/latest/scripts/lint.sh) -->
4
-
3
+ [ ![ Lint] ( https://github.com/ansibleguy/collection_systemd/actions/workflows/lint.yml/badge.svg )] ( https://github.com/ansibleguy/collection_systemd/actions/workflows/lint.yml )
5
4
[ ![ Ansible Galaxy] ( https://badges.ansibleguy.net/galaxy.badge.svg )] ( https://galaxy.ansible.com/ui/repo/published/ansibleguy/systemd )
6
5
6
+ ** Functional Tests** :
7
+
8
+ * Status: [ ![ Functional Test Status] ( https://badges.ansibleguy.net/systemd.collection.test.svg )] ( https://github.com/ansibleguy/collection_systemd/blob/latest/scripts/test.sh ) |
9
+ [ ![ Functional-Tests] ( https://github.com/ansibleguy/collection_systemd/actions/workflows/functional_test_result.yml/badge.svg )] ( https://github.com/ansibleguy/collection_systemd/actions/workflows/functional_test_result.yml )
10
+ * Logs: [ API] ( https://ci.ansibleguy.net/api/job/ansible-test-collection-systemd/logs?token=2b7bba30-9a37-4b57-be8a-99e23016ce70&lines=1000 ) |
11
+ [ Daily Archive] ( https://github.com/ansibleguy/collection_systemd/actions/workflows/functional_test_result.yml ) |
12
+ [ Short] ( https://badges.ansibleguy.net/log/collection_systemd_test_short.log ) | [ Full] ( https://badges.ansibleguy.net/log/collection_systemd_test.log )
13
+
14
+ Internal CI: [ Tester Role] ( https://github.com/ansibleguy/_meta_cicd ) | [ Jobs API] ( https://github.com/O-X-L/github-self-hosted-jobs-systemd )
15
+
7
16
----
8
17
9
18
## Contribute
You can’t perform that action at this time.
0 commit comments