42 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
| ---
 | |
| 
 | |
| name: Integration-Tests
 | |
| 
 | |
| on:
 | |
|   schedule:
 | |
|     - cron: "26 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.oss.oxl.app'
 | |
| 
 | |
|     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 --fail-with-body 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 --fail-with-body 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
 |