diff --git a/.github/workflows/integration_test_result.yml b/.github/workflows/integration_test_result.yml new file mode 100644 index 0000000..a32a484 --- /dev/null +++ b/.github/workflows/integration_test_result.yml @@ -0,0 +1,40 @@ +--- + +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 }}' + + 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/${{ env.CI_JOB }}/logs?token=${{ secrets.CI_TOKEN_RO }} | 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://ci.ansibleguy.net/api/job/${{ env.CI_JOB }}/state?token=${{ secrets.CI_TOKEN_RO }} | jq -r '.state' | grep -q 'failed' && exit 1 || exit 0 + shell: bash diff --git a/README.md b/README.md index e0ac814..a051bc6 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,17 @@ Ansible Role to create certificates to use on a linux server. -[![Molecule Test Status](https://badges.ansibleguy.net/infra_certs.molecule.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/molecule.sh.j2) -[![YamlLint Test Status](https://badges.ansibleguy.net/infra_certs.yamllint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/yamllint.sh.j2) -[![PyLint Test Status](https://badges.ansibleguy.net/infra_certs.pylint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/pylint.sh.j2) -[![Ansible-Lint Test Status](https://badges.ansibleguy.net/infra_certs.ansiblelint.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/ansiblelint.sh.j2) +[![Lint](https://github.com/ansibleguy/infra_certs/actions/workflows/autolint.yml/badge.svg)](https://github.com/ansibleguy/infra_certs/actions/workflows/autolint.yml) [![Ansible Galaxy](https://badges.ansibleguy.net/galaxy.badge.svg)](https://galaxy.ansible.com/ui/standalone/roles/ansibleguy/infra_certs) -Molecule Logs: [Short](https://badges.ansibleguy.net/log/molecule_infra_certs_test_short.log), [Full](https://badges.ansibleguy.net/log/molecule_infra_certs_test.log) +**Molecule Integration-Tests**: + +* Status: [![Molecule Test Status](https://badges.ansibleguy.net/infra_certs.molecule.svg)](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/molecule.sh.j2) | +[![Functional-Tests](https://github.com/ansibleguy/infra_certs/actions/workflows/integration_test_result.yml/badge.svg)](https://github.com/ansibleguy/infra_certs/actions/workflows/integration_test_result.yml) +* Logs: [API](https://ci.ansibleguy.net/api/job/ansible-test-molecule-infra_certs/logs?token=2b7bba30-9a37-4b57-be8a-99e23016ce70&lines=1000) | [Short](https://badges.ansibleguy.net/log/molecule_infra_certs_test_short.log) | [Full](https://badges.ansibleguy.net/log/molecule_infra_certs_test.log) + +Internal CI: [Tester Role](https://github.com/ansibleguy/_meta_cicd) | [Jobs API](https://github.com/O-X-L/github-self-hosted-jobs-systemd) + **Tested:** * Debian 11