-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Resolve GitLab [#76]: Update dependencies to resolve failing tests * ci: Adds .github/workflows/ci.yml * docs: Adds CI status badge to README.md Co-authored-by: Bryant Finney <finneybp@gmail.com>
- Loading branch information
1 parent
16ee940
commit 488ce93
Showing
35 changed files
with
851 additions
and
703 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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
pull_request: | ||
|
||
jobs: | ||
ci: | ||
name: test-${{ matrix.os }}-python${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
|
||
# this works like a loop; think `pytest.mark.parametrize` | ||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- name: checkout build | ||
id: checkout-build | ||
uses: actions/checkout@v2 | ||
|
||
# with this we do not need to worry about the various ways in which | ||
# each os installs python | ||
- name: setup python | ||
id: setup-python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: upgrade pip | ||
id: upgrade-pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
# gets the path to wherever each os stores pip's cache | ||
- name: get pip cache dir | ||
id: get-pip-cache-dir | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: cache pip | ||
uses: actions/cache@v2 | ||
id: cache-pip | ||
with: | ||
|
||
# set above with `get pip cache dir` | ||
path: ${{ steps.get-pip-cache-dir.outputs.dir }} | ||
|
||
# determines whether the hash of setup.py has changed | ||
# CACHE_VERSION: slight hack, see https://stackoverflow.com/a/64819132 | ||
key: ${{ runner.os }}-pip-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/setup.py') }} | ||
|
||
- name: install packages | ||
id: install-packages | ||
run: | | ||
python -m pip install .[dev] codecov | ||
- name: test | ||
id: test | ||
|
||
# python -m codecov only to run if exit status is 0 | ||
run: | | ||
python -m pytest --cov=pipenv_setup --cov-report=xml && python -m codecov |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": "Pipfile", | ||
"options": { "parser": "toml" } | ||
}, | ||
{ | ||
"files": "Pipfile.lock", | ||
"options": { "parser": "json", "tabWidth": 4 } | ||
} | ||
], | ||
"tabWidth": 2 | ||
} |
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.