diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c082948..76decff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,3 +24,15 @@ jobs: - name: CI Build run: | ./script/cibuild + setup-py: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + architecture: x64 + - name: CI setup.py + run: | + ./script/cibuild-setup-py diff --git a/script/cibuild b/script/cibuild index 2826596..77d7a2c 100755 --- a/script/cibuild +++ b/script/cibuild @@ -26,16 +26,4 @@ echo "## lint ################################################################## script/lint echo "## tests/coverage ##############################################################" script/coverage -echo "## validate setup.py build #####################################################" -python setup.py build -echo "## validate setup.py install ###################################################" -deactivate -TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX) -python3 -m venv $TMP_DIR -. "$TMP_DIR/bin/activate" -python setup.py install -octodns-sync --help -echo "## validate tests can run against installed code ###############################" -pip install pytest pytest-network -pytest --disable-network echo "## complete ####################################################################" diff --git a/script/cibuild-setup-py b/script/cibuild-setup-py new file mode 100755 index 0000000..49f8409 --- /dev/null +++ b/script/cibuild-setup-py @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +cd "$(dirname "$0")/.." + +echo "## create test venv ############################################################" +TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX) +python3 -m venv $TMP_DIR +. "$TMP_DIR/bin/activate" +echo "## environment & versions ######################################################" +python --version +pip --version +echo "## validate setup.py build #####################################################" +python setup.py build +echo "## validate setup.py install ###################################################" +python setup.py install +echo "## validate tests can run against installed code ###############################" +pip install pytest pytest-network +pytest --disable-network +echo "## complete ####################################################################"