Update test.yml #31
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: test | |
on: | |
push: | |
pull_request: | |
types: [review_requested, ready_for_review] | |
jobs: | |
# ************************************* | |
# ************* Pre-commit ************ | |
# ************************************* | |
pre-commit: | |
name: pre-commit ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
python-version: | |
# - "3.11" | |
- "3.10" | |
# - "3.9" | |
# - "3.8" | |
# - "3.7" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install detect-secrets | |
run: pip install --no-cache-dir detect-secrets doc8 isort==5.11.5 | |
- name: Run pre-commit | |
uses: pre-commit/action@v3.0.0 | |
# ************************************* | |
# *********** Additional tests ******** | |
# ************************************* | |
test: | |
needs: pre-commit | |
name: test ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
os: | |
- ubuntu-22.04 | |
# - Windows | |
# - MacOs | |
python-version: | |
- "3.12" | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
- "3.8" | |
steps: | |
- name: Clean-up | |
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install tox | |
run: | | |
pip install -e .[all] | |
- name: Run test suite | |
run: pytest -vrx | |
env: | |
PYTEST_ADDOPTS: "-vv --durations=10" | |
# ************************************* | |
# ************** Coveralls ************ | |
# ************************************* | |
coveralls_finish: | |
name: coveralls_finish | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
python -m pip install pyyaml | |
- name: Coveralls Finished | |
id: coveralls-finish | |
continue-on-error: true | |
# if: steps.coveralls-setup.outcome == 'success' | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel-finished: true | |
debug: True |