mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-07 14:58:56 +00:00
Enable parallel and stress testing
This commit is contained in:
11
.github/workflows/python-ci.yml
vendored
11
.github/workflows/python-ci.yml
vendored
@@ -5,6 +5,8 @@ on:
|
||||
branches: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "**" ]
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -19,6 +21,8 @@ jobs:
|
||||
- os: windows-latest
|
||||
python-version: "3.10"
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
HYPOTHESIS_SEED: 123456
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
@@ -63,13 +67,18 @@ jobs:
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r src/requirements.txt
|
||||
- name: Determine stress args
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "schedule" ]; then
|
||||
echo "STRESS_ARGS=--stress" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Enable Nostr network tests on main branch
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: echo "NOSTR_E2E=1" >> $GITHUB_ENV
|
||||
- name: Run tests with coverage
|
||||
shell: bash
|
||||
run: |
|
||||
pytest --cov=src --cov-report=xml --cov-report=term-missing \
|
||||
pytest ${STRESS_ARGS} --cov=src --cov-report=xml --cov-report=term-missing \
|
||||
--cov-fail-under=20 src/tests
|
||||
- name: Upload coverage report
|
||||
uses: actions/upload-artifact@v4
|
||||
|
Reference in New Issue
Block a user