Use GitHub Actions instead of Travis CI #11
Workflow file for this run
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: main | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
tests: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
max-parallel: 8 | |
matrix: | |
platform: | |
- ubuntu-latest | |
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install flake8 | |
python -m pip install -e .[tests_cov] | |
- name: Unit Tests | |
run: pytest --color=yes --cov=click_option_group --cov-report=term --cov-report=lcov:coverage.info | |
- name: Coveralls | |
if: ${{ matrix.python-version == '3.8' }} | |
uses: coverallsapp/github-action@v2 | |
with: | |
format: lcov | |
file: coverage.info | |
- name: flake8 Static Analysis | |
if: ${{ matrix.python-version == '3.11' }} | |
run: flake8 click_option_group/ tests/ setup.py | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install -e .[docs] | |
- name: Build Docs | |
run: make -C docs/ html |