conductor system tests #597
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: conductor system tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '00 17 * * *' | |
push: | |
branches: | |
- main | |
jobs: | |
system-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
poetry-version: ["1.4.2"] | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run image | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install package dependencies | |
run: poetry install | |
- name: Execute worker and dependency | |
run: | | |
docker compose -f tests/execute_sdk/docker-compose.yml up -d | |
sleep 20 # TODO ADD HEALTHCHECK TO WORKER | |
- name: Run system tests | |
run: | | |
export CONDUCTOR_URL_BASE="http://localhost:8080/api/" | |
mkdir -p logs | |
poetry run pytest tests/system_tests/ -vv \ | |
--junit-xml=logs/test-results.xml \ | |
--log-file=logs/pytest_log_file.log | |
- name: Collect logs to file | |
if: ${{ always() }} | |
run: | | |
mkdir -p logs | |
for container in $(docker ps --format '{{ .Names }}') | |
do | |
docker container logs $container &> logs/$container.log | |
docker container inspect $container &> logs/${container}_inspect.json | |
done | |
- name: Upload pytest logs | |
if: ${{ always() }} | |
uses: actions/[email protected] | |
with: | |
name: ${{ github.workflow }}_pytest_logs.zip | |
path: | | |
${{ github.workspace }}/logs/ | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Surface failing tests | |
if: ${{ always() }} | |
uses: pmeier/pytest-results-action@main | |
with: | |
path: logs/test-results.xml |