-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from olin/fix-ci
Fix CI
- Loading branch information
Showing
6 changed files
with
183 additions
and
73 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,44 @@ | ||
name: Python package | ||
# mash-up of matrix and pipenv examples from <https://github.com/actions/setup-python#usage> | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
types: [opened, synchronize, reopened] # default events | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
fail-fast: false # prevent one broken version from stopping all other runs | ||
matrix: | ||
python-version: [3.5, 3.6, 3.7, 3.8] | ||
|
||
# these will be out of date again eventually, add the latest versions | ||
# and remove the unsupported ones | ||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] | ||
name: Python ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
- uses: actions/checkout@v3 | ||
- name: Install pipenv | ||
run: pipx install pipenv | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
cache: 'pipenv' | ||
- name: Install dependencies | ||
run: | | ||
pip install pipenv | ||
pipenv install --dev | ||
run: pipenv install --dev | ||
- name: Lint with flake8 | ||
run: pipenv run flake8 *.py | ||
continue-on-error: true | ||
- name: Typecheck with mypy | ||
run: pipenv run mypy *.py | ||
- name: Test with unittest | ||
run: | | ||
pipenv run python -m unittest discover -v | ||
- name: Install with pip | ||
run: | | ||
pip install . | ||
run: pipenv run python -m unittest discover -v | ||
- name: Install as package with pip | ||
run: pip install . | ||
- name: Run installed version | ||
run: | | ||
focstest --version |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.