-
-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (33 loc) · 1.02 KB
/
integration_test_result.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
---
name: Integration-Tests
on:
schedule:
- cron: "31 6 * * *"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 1
env:
CI_JOB: 'ansible-test-molecule-${{ github.event.repository.name }}'
CI_DOMAIN: 'ci.ansibleguy.net'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Install dependencies
run: sudo apt install curl jq
shell: bash
- name: Pulling logs
run: curl -f https://${{ env.CI_DOMAIN }}/api/job/${{ env.CI_JOB }}/logs?token=${{ secrets.CI_TOKEN_RW }} | jq > /tmp/test.log
shell: bash
- uses: actions/upload-artifact@v4
with:
name: test-logs
path: /tmp/test.log
retention-days: 14
- name: Checking job-state
run: >
curl https://${{ env.CI_DOMAIN }}/api/job/${{ env.CI_JOB }}/state?token=${{ secrets.CI_TOKEN_RW }} | jq -r '.state' | grep -q 'failed' && exit 1 || exit 0
shell: bash