Cloud Pro Test Every - 15 Minute #11602
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: Cloud Pro Test Every - 15 Minute | |
on: | |
schedule: | |
- cron: '*/15 * * * *' | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Production", "Production Custom"] | |
types: | |
- completed | |
jobs: | |
requested: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Discord Webhook Action | |
if: ${{ github.event_name == 'workflow_run' }} | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.CLOUD_PRO_TEST_WEBHOOK_URL }} | |
content: "Requested <@&1163402741394178162>" | |
ubuntu: | |
needs: requested | |
runs-on: ${{ matrix.os }} | |
environment: UNIT Tests | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: '3.8' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
pip install upsonic --no-cache --upgrade | |
- name: Test with pytest | |
env: | |
CLOUD_PRO_ACCESS_KEY: ${{ secrets.CLOUD_PRO_ACCESS_KEY }} | |
CLOUD_TEST_DATABASE_NAME: ${{ secrets.CLOUD_TEST_DATABASE_NAME }} | |
run: | | |
cd tests | |
pytest test_cloud_pro.py -v | |
macos: | |
needs: ubuntu | |
runs-on: ${{ matrix.os }} | |
environment: UNIT Tests | |
strategy: | |
matrix: | |
os: [macos-latest] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: '3.8' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
pip install upsonic --no-cache --upgrade | |
- name: Test with pytest | |
env: | |
CLOUD_PRO_ACCESS_KEY: ${{ secrets.CLOUD_PRO_ACCESS_KEY }} | |
CLOUD_TEST_DATABASE_NAME: ${{ secrets.CLOUD_TEST_DATABASE_NAME }} | |
run: | | |
cd tests | |
pytest test_cloud_pro.py -v | |
windows: | |
needs: macos | |
runs-on: ${{ matrix.os }} | |
environment: UNIT Tests | |
strategy: | |
matrix: | |
os: [windows-latest] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: '3.8' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
pip install upsonic --no-cache --upgrade | |
- name: Test with pytest | |
env: | |
CLOUD_PRO_ACCESS_KEY: ${{ secrets.CLOUD_PRO_ACCESS_KEY }} | |
CLOUD_TEST_DATABASE_NAME: ${{ secrets.CLOUD_TEST_DATABASE_NAME }} | |
run: | | |
cd tests | |
pytest test_cloud_pro.py -v | |
success: | |
needs: [ubuntu, macos, windows] | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' && (needs.ubuntu.result == 'success' || needs.macos.result == 'success' || needs.windows.result == 'success') }} | |
steps: | |
- name: Discord Webhook Action | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.CLOUD_PRO_TEST_WEBHOOK_URL }} | |
content: "success" | |
success_important: | |
runs-on: ubuntu-latest | |
needs: [ubuntu, macos, windows] | |
if: ${{ github.event_name == 'workflow_run' && (needs.ubuntu.result == 'success' || needs.macos.result == 'success' || needs.windows.result == 'success') }} | |
steps: | |
- name: Discord Webhook Action | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.CLOUD_PRO_TEST_WEBHOOK_URL }} | |
content: "success <@&1163402741394178162>" | |
failure: | |
needs: [ubuntu, macos, windows] | |
runs-on: ubuntu-latest | |
if: ${{ always() && (needs.ubuntu.result == 'failure' || needs.macos.result == 'failure' || needs.windows.result == 'failure') }} | |
steps: | |
- name: Discord Webhook Action | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.CLOUD_PRO_TEST_WEBHOOK_URL }} | |
content: "failure <@&1163402741394178162>" |