Only load provider metadata when not using dynamic discovery (#166) #154
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
tests: | |
name: Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: pip install -U setuptools tox tox-gh-actions pip virtualenv | |
- name: Run tox targets for ${{ matrix.python-version }} | |
run: "python -m tox" | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-data | |
path: ".coverage.*" | |
if-no-files-found: ignore | |
coverage: | |
name: Combine & check coverage. | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
# Use latest, so it understands all syntax. | |
python-version: "3.10" | |
- run: python -m pip install --upgrade coverage[toml] | |
- name: Download coverage data. | |
uses: actions/download-artifact@v2 | |
with: | |
name: coverage-data | |
- name: Combine coverage & fail if it's <100%. | |
run: | | |
python -m coverage combine | |
python -m coverage html --skip-covered --skip-empty | |
python -m coverage report --fail-under=97 | |
- name: Upload HTML report if check failed. | |
uses: actions/upload-artifact@v2 | |
with: | |
name: html-report | |
path: htmlcov | |
if: ${{ failure() }} |