pipdeptree/.github/workflows/check.yml

56 lines
1.4 KiB
YAML

name: check
on:
push:
pull_request:
schedule:
- cron: "0 8 * * *"
jobs:
test:
name: Test on ${{ matrix.py }} under ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os:
- Ubuntu
py:
- 3.9-dev
- 3.8
- 3.7
- 3.6
- 3.5
- 3.4
- 2.7
- pypy3
- pypy2
steps:
- name: Setup graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Setup python for tox
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install tox
run: python -m pip install tox
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}
- uses: actions/checkout@v2
- name: Pick tox environment to run
run: |
import os
import platform
import sys
major, minor, impl = sys.version_info[0], sys.version_info[1], platform.python_implementation()
toxenv = ("py" if impl == "CPython" else "pypy") + ("{}{}".format(major, minor) if impl == "CPython" else ("3" if major == 3 else ""))
env_file = open(os.environ['GITHUB_ENV'], "a")
env_file.write("TOXENV={}\n".format(toxenv))
env_file.close()
shell: python
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install