[pre-commit.ci] pre-commit autoupdate #404
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: wt.pf4 tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: ["opened", "synchronize", "reopened"] | |
create: | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
browser: [chrome, firefox] | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -U pip wheel | |
pip install .[dev] | |
- name: Fetch selenium image | |
run: podman pull selenium/standalone-${{ matrix.browser }}:4.9.0-20230421 | |
- name: Test with pytest | |
env: | |
BROWSER: ${{ matrix.browser }} | |
run: | | |
pytest -v -n 5 --no-cov-on-fail \ | |
--cov=widgetastic_patternfly4 \ | |
--cov-append | |
mv .coverage ${{ strategy.job-index }}_coverage | |
- name: Upload coverage artifact | |
uses: "actions/upload-artifact@v3" | |
with: | |
name: ${{ strategy.job-index }}_coverage | |
path: ${{ strategy.job-index }}_coverage | |
submit_coverage: | |
runs-on: ubuntu-22.04 | |
needs: test | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- uses: actions/checkout@v3 | |
- name: Install coverage | |
run: pip install coverage | |
- name: Download coverage artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: /tmp/coverage | |
- name: Combine coverage data files | |
run: | | |
coverage combine -a $(find /tmp/coverage -type f) | |
coverage xml -o /tmp/coverage.xml | |
- name: Publish coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: /tmp/coverage.xml |