1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Merge pull request #893 from octodns/split-out-cibuild-setup-py

Split out cibuild-setup-py
This commit is contained in:
Ross McFarland
2022-03-27 07:44:23 -07:00
committed by GitHub
3 changed files with 32 additions and 12 deletions

View File

@@ -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

View File

@@ -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 ####################################################################"

20
script/cibuild-setup-py Executable file
View File

@@ -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 ####################################################################"