diff --git a/.github/workflows/test-reliability.yml b/.github/workflows/test-reliability.yml new file mode 100644 index 000000000..01dea236e --- /dev/null +++ b/.github/workflows/test-reliability.yml @@ -0,0 +1,51 @@ +name: Test Reliability + +on: + workflow_dispatch: + schedule: + - cron: '0 2 * * *' + +env: + FORCE_COLOR: "1" + +jobs: + test-reliability: + timeout-minutes: 90 + runs-on: ubuntu-latest + permissions: + contents: read # Restrict repository access to read-only + actions: read # Only read actions, no write access + checks: write # Allow posting test reports + steps: + + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: actions/setup-python@v4 + with: + python-version: '3.12' + cache: 'pip' + + - name: Set up virtual environment in /tests-functional/ + run: | + python -m venv tests-functional/.venv + echo "tests-functional/.venv/bin" >> $GITHUB_PATH # Add virtualenv to PATH for subsequent steps + + - name: Install dependencies based on requirements.txt + run: pip install -r tests-functional/requirements.txt + + - name: Build status-backend + run: cd tests-functional; docker compose -f docker-compose.anvil.yml -f docker-compose.test.status-go.yml -f docker-compose.status-go.local.yml up --build --remove-orphans -d + + - name: Run tests + run: pytest -n auto -m "reliability" -c tests-functional/pytest.ini --junit-xml=pytest_results.xml --tb=short + + - name: Test Report + if: always() + uses: dorny/test-reporter@95058abb17504553158e70e2c058fe1fda4392c2 + with: + name: Pytest JUnit Test Report + path: pytest_results.xml + reporter: java-junit + use-actions-summary: 'true' diff --git a/tests-functional/Dockerfile b/tests-functional/Dockerfile index c6a8776fc..ffe05ff0e 100644 --- a/tests-functional/Dockerfile +++ b/tests-functional/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/foundry-rs/foundry:latest +FROM ghcr.io/foundry-rs/foundry:stable RUN apk update && \ apk add git bash diff --git a/tests-functional/requirements.txt b/tests-functional/requirements.txt index e728bf878..657053fdf 100644 --- a/tests-functional/requirements.txt +++ b/tests-functional/requirements.txt @@ -1,14 +1,13 @@ -deepdiff==5.5.0 +deepdiff~=5.5.0 jsonschema~=3.2.0 -pytest==6.2.4 -requests==2.31.0 +pytest~=7.0.0 +requests~=2.31.0 genson~=1.2.2 websocket-client~=1.4.2 tenacity~=9.0.0 pytest-dependency~=0.6.0 -docker==7.1.0 -pyright==1.1.388 -black==24.10.0 -pre-commit==3.6.2 -allure-pytest==2.13.5 -allure-python-commons==2.13.5 \ No newline at end of file +docker~=7.1.0 +pyright~=1.1.388 +black~=24.10.0 +pre-commit~=3.6.2 +pytest-xdist~=3.6.1