Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Python SDK Test

Python SDK Test #113

Workflow file for this run

name: Python SDK Test
on:
# Run the tests on every push to the master branch
push:
branches: [ "master" ]
# Run the tests for the default branch [master] every Monday 3:00 pm UTC time (8:00 am PST)
schedule:
- cron: "0 15 * * 1"
# Run the tests by clicking a button in GitHub's UI
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python: ["3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: pip install tox
- id: test
name: Run the tests for PROD
env:
SHIPPO_API_KEY: ${{ secrets.SHIPPO_PROD_TEST_KEY }}
SHIPPO_API_BASE: ${{ secrets.SHIPPO_PROD_API_BASE }}
run: tox -e py
- name: Send a Slack notification saying if tests are passing/failing for a given Python version
if: always()
shell: bash
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
run: |
conclusion=${{ steps.test.conclusion }}
if [[ "$conclusion" == "success" ]]; then
message="✅ Python SDK Test succeeded [Env: PROD, Python version: ${{ matrix.python }}]"
else
message="❌ Python SDK Test failed [Env: PROD, Python version: ${{ matrix.python }}]"
fi
curl -X POST --data-urlencode "payload={\"text\": \"$message\", \"link_names\": 1}" $SLACK_WEBHOOK_URL