74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
name: Continuous Deployment Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
system_tests:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 25
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install protoc
|
|
shell: bash
|
|
run: sudo apt-get install -y --no-install-recommends protobuf-compiler
|
|
|
|
- name: Install protoc-gen-mypy plugin
|
|
shell: bash
|
|
run: uv tool install mypy-protobuf
|
|
|
|
- name: Generate protobuf files
|
|
working-directory: solution
|
|
shell: bash
|
|
run: bash build_proto.sh
|
|
|
|
- name: Build wheel
|
|
working-directory: solution
|
|
shell: bash
|
|
run: uv build
|
|
|
|
- name: Create virtual environment
|
|
working-directory: solution
|
|
shell: bash
|
|
run: uv venv .venv
|
|
|
|
- name: Install wheel
|
|
working-directory: solution
|
|
shell: bash
|
|
run: uv pip install --python .venv dist/*.whl
|
|
|
|
- name: Create logs directory
|
|
working-directory: solution
|
|
shell: bash
|
|
run: mkdir -p logs
|
|
|
|
- name: Run system tests
|
|
working-directory: solution
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
.venv/bin/pytest tests/ \
|
|
--venv-path=.venv \
|
|
--deployment-config=deployment_config.json \
|
|
--junit-xml=logs/test_results.xml \
|
|
-W error::pytest.PytestUnhandledThreadExceptionWarning
|
|
|
|
- name: Upload test artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: test-results
|
|
if-no-files-found: warn
|
|
path: solution/logs/ |