Periodic tests via Python SDK #136
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: Periodic tests via Python SDK | |
on: | |
schedule: | |
- cron: "17 */8 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: Periodic tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./packages/python-sdk | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.5.1 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install dependencies | |
run: poetry install | |
- name: Run tests | |
run: poetry run pytest -n auto | |
env: | |
E2B_API_KEY: ${{ secrets.E2B_API_KEY }} | |
- name: Upload Results | |
run: poetry run python scripts/upload_test_results.py | |
env: | |
SUPABASE_POSTGRES_URL: ${{ secrets.SUPABASE_POSTGRES_URL }} | |
- name: Release Failed - Slack Notification | |
if: failure() | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_COLOR: '#ff0000' | |
SLACK_MESSAGE: ':this-is-fine: :meow-code: We need :fix-parrot: ASAP :pray:' | |
SLACK_TITLE: Tasts Failed | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |