Skip to content

Commit

Permalink
update CI to generalize #43
Browse files Browse the repository at this point in the history
  • Loading branch information
daringer committed Sep 27, 2020
1 parent 0f7138d commit 3f75d90
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 9 deletions.
44 changes: 39 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,50 @@ jobs:
executor: python/default
steps:
- checkout
- run: make system-pip-install-test
- run: make system-pip-install
- run: make system-nitropy-test-simple
- run: make system-pip-uninstall
- run: make system-pip-install-test
- run: make system-pip-install-test
- run: make system-pip-install
- run: make system-nitropy-test-simple
- run: make system-pip-install
- run: make system-nitropy-test-simple
- run: make system-pip-uninstall

install-with-older-fido:
executor: python/default
steps:
- checkout
- run: python -m pip install fido2==0.7.2
- run: python -m pip install pynitrokey
- run: nitropy
- run: make system-pip-install
- run: make system-nitropy-test-simple

install-last-version-and-no-upgrade-install:
executor: python/default
steps:
- checkout
- run: make system-pip-install-last-version
- run: make system-nitropy-test-simple
- run: make system-pip-install
- run: make system-nitropy-test-simple

install-last-version-uninstall-no-upgrade-install:
executor: python/default
steps:
- checkout
- run: make system-pip-install-last-version
- run: make system-nitropy-test-simple
- run: make system-pip-uninstall
- run: make system-pip-install
- run: make system-nitropy-test-simple

install-last-version-upgrade-install:
executor: python/default
steps:
- checkout
- run: make system-pip-install-last-version
- run: make system-nitropy-test-simple
- run: make system-pip-install-upgrade
- run: make system-nitropy-test-simple

workflows:
main:
Expand All @@ -44,3 +75,6 @@ workflows:
- build-linux
- install-test-pip
- install-with-older-fido
- install-last-version-upgrade-install
- install-last-version-uninstall-no-upgrade-install
- install-last-version-and-no-upgrade-install
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ clean: semi-clean

VERSION_FILE := "$(PACKAGE_NAME)/VERSION"
VERSION := $(shell cat $(VERSION_FILE))

tag:
git tag -a $(VERSION) -m"v$(VERSION)"
git push origin $(VERSION)
Expand All @@ -50,14 +51,24 @@ build: check
publish:
$(VENV)/bin/python3 -m flit --repository pypi publish

system-pip-install-test:
system-pip-install-upgrade:
python -m pip install -U pynitrokey
which nitropy
nitropy

system-pip-install-last-version:
python -m pip install pynitrokey== 2>&1 | grep -oE ", ([^,]+), ([^,]+)\)$$" | cut -d "," -f 2 | xargs > LAST_VERSION
python -m pip install pynitrokey==`cat LAST_VERSION | xargs`

system-pip-install:
python -m pip install pynitrokey

system-pip-uninstall:
python -m pip uninstall pynitrokey -y


system-nitropy-test-simple:
which nitropy
nitropy


$(VENV):
python3 -m venv $(VENV)
$(VENV)/bin/python3 -m pip install -U pip
Expand Down

0 comments on commit 3f75d90

Please sign in to comment.