FINOS Waltz Charmed Operator Jobs #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: FINOS Waltz Charmed Operator Jobs | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
schedule: | |
# Runs everyday at 00:00. (see https://crontab.guru) | |
- cron: "0 0 * * *" | |
jobs: | |
lint: | |
if: github.event_name != 'schedule' | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: python3 -m pip install tox | |
- name: Run linters | |
run: tox -vve lint | |
unit-test: | |
if: github.event_name != 'schedule' | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: python -m pip install tox | |
- name: Run tests | |
run: tox -vve unit | |
integration-test: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: python -m pip install tox | |
- name: Setup operator environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
provider: microk8s | |
juju-channel: 3.1/stable | |
channel: 1.27-strict/stable | |
microk8s-addons: "storage dns rbac ingress" | |
- name: Run integration tests | |
run: tox -vve integration | |
- name: Send email on failure | |
if: failure() && github.event_name == 'schedule' | |
uses: vineetchoudhary/mailgun-action@master | |
with: | |
api-key: ${{ secrets.MAILGUN_API_KEY }} | |
domain: ${{ secrets.MAILGUN_DOMAIN }} | |
to: ${{ secrets.EMAIL_TO }} | |
subject: "${{ github.job }} job of ${{ github.repository }} has failed" | |
body: "${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
- name: Send Mail Action Response | |
run: echo "${{ steps.sendmail.outputs.response }}" |