Skip to content

Functional-Tests

Functional-Tests #2

---
name: Functional-Tests
on:
schedule:
- cron: "25 6 * * *"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 1
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 https://ci.ansibleguy.net/api/job/ansible-test-collection-opnsense/logs?token=${{ secrets.CI_TOKEN_RO }} | jq > /tmp/test.log
shell: bash
- uses: actions/upload-artifact@v4
with:
name: integration-test-logs
path: /tmp/test.log
retention-days: 14
- name: Checking job-state
run: >
curl https://ci.ansibleguy.net/api/job/ansible-test-collection-opnsense/state?token=${{ secrets.CI_TOKEN_RO }} | jq -r '.state' | grep -q 'failed' && exit 1 || exit 0
shell: bash