Skip to content

Nightly Tests

Nightly Tests #36

Workflow file for this run

name: Nightly Tests
permissions:
actions: read
on:
schedule:
- cron: '0 0 * * *'
jobs:
nightly:
strategy:
fail-fast: false
matrix:
python-version: [ '3.10' ,'3.11', '3.12', '3.13' ]
products:
- instance
- k8s
- vpc
lib:
- scaleway
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.lib }}
steps:
- uses: actions/checkout@v5
- name: Install poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies and library
run: poetry install
- name: Run Tests
env:
PYTHON_UPDATE_CASSETTES: true
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}
SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
run: poetry run pytest -v --timeout=14400 ./${{ matrix.lib }}/${{ matrix.products }}/
- name: Ping on failure
if: ${{ failure() }}
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "'"Scaleway SDK Python Nightly workflow failed: <https://github.com/scaleway/scaleway-sdk-python/actions/runs/${GITHUB_RUN_ID}|${FAILED_PRODUCT}>"'"
}
}
]
}' \
"${SLACK_WEBHOOK_NIGHTLY}";
env:
SLACK_WEBHOOK_NIGHTLY: ${{ secrets.SLACK_WEBHOOK_NIGHTLY }}
FAILED_PRODUCT: "${{ matrix.products }}"