From 58d82220c696020c7c8d27e2fadf4ecb8892ba48 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Mon, 13 May 2024 16:46:16 +1200 Subject: [PATCH] ci: Created cron test [skip ci] --- .github/workflows/ci.yml | 4 +-- .github/workflows/cron.yml | 56 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/cron.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa52928..48d0de7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,7 @@ on: - "**" tags: - "!**" - schedule: - - cron: "35 * * * *" - + jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000..4ef1e11 --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,56 @@ +name: Regular test +on: + schedule: + - cron: "47 * * * *" + +jobs: + molecule: + name: Molecule Test + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + os: [almalinux8, almalinux9] + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + cache: 'pip' # caching pip dependencies + + - name: Ensure requirements are installed + run: pip install -r requirements.txt + + - name: Run Molecule tests. + run: molecule test + env: + PY_COLORS: '1' + ANSIBLE_FORCE_COLOR: '1' + MOLECULE_DISTRO: ${{ matrix.os }} + - name: ntfy-success-notifications + uses: niniyas/ntfy-action@master + if: success() + with: + url: '${{ vars.NTFY_URL }}' + title: Workflow success + topic: 'ci-status' + priority: 4 + tags: +1,partying_face,action,successfully,completed + details: Workflow has been successfully completed! + icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png' + image: true + + - name: ntfy-failed-notifications + uses: niniyas/ntfy-action@master + if: failure() + with: + url: '${{ vars.NTFY_URL }}' + title: Workflow failed + topic: 'ci-status' + priority: 5 + tags: -1,skull,action,failed + details: Workflow has failed! + actions: 'default' \ No newline at end of file