Skip to content

Acceptance Tests in LPG1 #852

Acceptance Tests in LPG1

Acceptance Tests in LPG1 #852

name: Acceptance Tests in LPG1
on:
# Tests are only run on a regular schedule, or if they are manually started.
#
# * Pull requests are disabled because anonymous users could cause resource
# usage in the cloud, causing unintended costs.
#
# * Changes to the main branch are not tested, as we do that nightly anyway
# and the expectation is that new tests are tested locally, in a more
# explicit and change-specific way.
#
# Scheduled tests (UTC)
schedule:
- cron: '0 18 * * *'
# Manual execution through the UI by collaborators
workflow_dispatch:
jobs:
acceptance-tests-in-lpg1:
runs-on: [self-hosted, lpg1]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
env:
CLOUDSCALE_API_TOKEN: ${{ secrets.CLOUDSCALE_API_TOKEN }}
run: |
pytest . --zone=lpg1 -n 2 -v --color=yes --reruns=1
- name: Upload events log
if: always()
uses: actions/upload-artifact@v3
with:
name: events-log
path: events
- name: Cleanup
if: always()
env:
CLOUDSCALE_API_TOKEN: ${{ secrets.CLOUDSCALE_API_TOKEN }}
run: invoke cleanup