Skip to content

Test Public Examples #267

Test Public Examples

Test Public Examples #267

Workflow file for this run

name: Test Public Examples
on:
workflow_dispatch:
inputs:
api_url:
description: "Sieve API URL"
required: false
default: "https://mango.sievedata.com"
schedule:
- cron: "0 0 * * *"
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install https://mango.sievedata.com/v1/client_package/sievedata-0.0.1.1.2-py3-none-any.whl
- name: Deploy & test examples
id: test
env:
SIEVE_API_KEY: ${{ secrets.SIEVE_API_KEY }}
SIEVE_API_URL: ${{ github.event.inputs.api_url || 'https://mango.sievedata.com' }}
run: |
python test.py --deploy --test --github
- name: Notify Slack on completion
if: always()
uses: slackapi/[email protected]
with:
payload: |
{
"attachments": [
{
"color": "${{ job.status == 'success' && '#008000' || '#FF0000'}}",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ job.status == 'success' && ':white_check_mark:' || ':x:'}} Examples deploy & test ${{ job.status }}",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Info\n${{ env.job_info }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Action: <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Link>"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK