Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,26 @@ jobs:
continue-on-error: true
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- uses: actions/setup-python@v2
with:
python-version: 3.8.x
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }}
restore-keys: |
pip-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }}
pip-ubuntu-latest-py3.8-
- uses: actions/cache@v1
with:
path: ~/.local/share/virtualenvs
key: virtualenvs-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }}
restore-keys: |
virtualenvs-ubuntu-latest-py3.8-${{ hashFiles('Pipfile.lock') }}
virtualenvs-ubuntu-latest-py3.8-
- run: pip install -U -I --pre pipenv pip
- run: pipenv lock --dev --pre --requirements | awk -F= '{ print $1 }' >requirements-unlocked.txt
- run: pipenv run pip install --pre -r requirements-unlocked.txt
- run: pipenv run pip freeze
- run: rm -vf requirements-unlocked.txt
- run: make deps-prerelease
- run: make fmt
- run: make lint
- run: pipenv run python setup.py --version
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/.idea/
/.jupyter/
/.local/
/.pipenv-requires
/build/
/dist/
/node_modules/
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ fmt-3.5: .fmt-unsupported
@echo ERROR: This python version cannot run the fmting tools
@exit 1

.PHONY: deps-prerelease
deps-prerelease:
pipenv run ./scripts/install-deps-prerelease

deps-%:
$(RUNNER) 'pipenv run ./scripts/install-deps'

Expand Down
33 changes: 19 additions & 14 deletions scripts/install-deps
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o xtrace

case "${PYTHON_VERSION}" in
2* | 3.5*)
pipenv install --skip-lock
pipenv run pip install \
pytest \
pytest-cov \
'coverage[toml]' \
setuptools_scm
;;
*)
pipenv install --dev
;;
esac
main() {
set -o xtrace

case "${PYTHON_VERSION}" in
2* | 3.5*)
pipenv install --skip-lock
pipenv run pip install \
pytest \
pytest-cov \
'coverage[toml]' \
setuptools_scm
;;
*)
pipenv install --dev
;;
esac
}

main "${@}"
28 changes: 28 additions & 0 deletions scripts/install-deps-prerelease
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -o errexit
set -o pipefail

main() {
set -o xtrace

local top
top="$(git rev-parse --show-toplevel)"

local pipenv_requires="${top}/.pipenv-requires"

pipenv install --dev
_print_pipfile_packages >"${pipenv_requires}"
pipenv run pip install -U --pre -r "${pipenv_requires}"
rm -f "${pipenv_requires}"
}

_print_pipfile_packages() {
pipenv run python <<PYTHON
import toml

for package in toml.load(open("${top}/Pipfile")).get("packages").keys():
print(package)
PYTHON
}

main "${@}"
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ install_requires =
click>=7.0.0
setup_requires =
setuptools
setuptools_scm>=3.4
toml
wheel
packages = rsconnect
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
zip_safe = true
Expand Down