Merge branch 'master' of https://github.com/Vexed01/Vex-Cogs #972
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: Checks | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
# thanks red or wherever you got it from | |
jobs: | |
tox: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python_version: | |
- "3.8" | |
- "3.11" | |
tox_env: | |
- style-black | |
- style-isort | |
- lint-flake8 | |
# - type-pyright | |
- docs | |
- pytest | |
include: | |
- tox_env: style-black | |
friendly_name: Style (black) | |
- tox_env: style-isort | |
friendly_name: Style (isort) | |
- tox_env: lint-flake8 | |
friendly_name: Lint (flake8) | |
# - tox_env: type-pyright | |
# friendly_name: Type check (pyright) | |
- tox_env: docs | |
friendly_name: Docs | |
- tox_env: pytest | |
friendly_name: Tests | |
fail-fast: false | |
name: Tox - ${{ matrix.python_version }} - ${{ matrix.friendly_name }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.ref }} | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
# caching cuts down time for tox (for example black) from ~40 secs to 4 | |
- name: Cache tox | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: tox-${{ matrix.python_version }}-${{ matrix.tox_env }}-${{ hashFiles('tox.ini') }} | |
- name: Install tox | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: "Run tox: ${{ matrix.friendly_name }}" | |
env: | |
TOXENV: ${{ matrix.tox_env }} | |
run: | | |
tox |