Skip to content

Commit

Permalink
[DO NOT MERGE] CI test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasValvekens committed Aug 9, 2023
1 parent 17ec5b3 commit 7d6a0c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 114 deletions.
113 changes: 0 additions & 113 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,116 +43,3 @@ jobs:
with:
name: pyhanko-dist
path: dist/
pytest-coverage:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download dist artifacts
uses: actions/download-artifact@v3
with:
name: pyhanko-dist
path: dist/
- uses: ./.github/actions/test-job-setup
- name: Test with pytest
run: python -m pytest --cov=./ --cov-report=xml:python-${{ matrix.python-version }}-coverage.xml
env:
PKCS11_TEST_MODULE: ${{ env.SOFTHSM2_MODULE_PATH }}
- name: Stash coverage report
uses: actions/upload-artifact@v3
with:
name: coverage
path: "*-coverage.xml"
live-integration-tests:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download dist artifacts
uses: actions/download-artifact@v3
with:
name: pyhanko-dist
path: dist/
- uses: ./.github/actions/test-job-setup
with:
dependency-group: live-test
- name: Start Certomancer Animator daemon
run: |
certomancer --service-url-prefix http://localhost:9000 \
--config "$CERTOMANCER_CONFIG_PATH" animate &
- name: Start CSC dummy server
run: |
certomancer-csc "$CERTOMANCER_CONFIG_PATH" 8999 2 &
- name: Test with pytest
run: |
python -m pytest --cov=./ --cov-report=xml:python-${{ matrix.python-version }}-live-coverage.xml \
pyhanko_tests/with_live_certomancer.py \
pyhanko_tests/with_live_csc_dummy.py
env:
LIVE_CERTOMANCER_HOST_URL: http://localhost:9000
LIVE_CSC_SCAL2_HOST_URL: http://localhost:8999
- name: Stash coverage report
uses: actions/upload-artifact@v3
with:
name: coverage
path: "*-coverage.xml"
smoke-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Download dist artifacts
uses: actions/download-artifact@v3
with:
name: pyhanko-dist
path: dist/
- uses: ./.github/actions/test-job-setup
with:
dependency-group: testing-basic
- name: Run smoke tests that should pass without optional dependencies
# We run a couple of the "bread and butter" test modules, and the full CLI test suite except for
# the PKCS#11 parts
run: |
python -m pytest \
pyhanko_tests/test_signing.py pyhanko_tests/test_diff_analysis.py pyhanko_tests/test_crypt.py \
pyhanko_tests/test_cms.py pyhanko_tests/cli_tests/*.py
codecov-upload:
runs-on: ubuntu-latest
needs: [pytest-coverage,live-integration-tests]
steps:
# checkout necessary to ensure the uploaded report contains the correct paths
- uses: actions/checkout@v3
- name: Retrieve coverage reports
uses: actions/download-artifact@v3
with:
name: coverage
path: ./reports/
- name: Upload all coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./reports/
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
- name: Clean up coverage reports
uses: GeekyEggo/delete-artifact@v2
with:
name: coverage
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
ci:
name: Run CI pipeline
uses: MatthiasValvekens/pyHanko/.github/workflows/build-pipeline.yml@master
uses: MatthiasValvekens/pyHanko/.github/workflows/build-pipeline.yml@ci/slsa
permissions:
actions: read
contents: read
Expand Down

0 comments on commit 7d6a0c1

Please sign in to comment.