mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Manually runnable modules test
This commit is contained in:
44
.github/workflows/modules.yml
vendored
Normal file
44
.github/workflows/modules.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: OctoDNS Modules
|
||||
on: []
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
modules:
|
||||
- octodns/octodns-azure
|
||||
- octodns/octodns-cloudflare
|
||||
- octodns/octodns-constellix
|
||||
- octodns/octodns-ddns
|
||||
- octodns/octodns-digitalocean
|
||||
- octodns/octodns-dnsimple
|
||||
- octodns/octodns-dnsmadeeasy
|
||||
- octodns/octodns-dyn
|
||||
- octodns/octodns-easydns
|
||||
- octodns/octodns-edgedns
|
||||
- octodns/octodns-etchosts
|
||||
- octodns/octodns-gandi
|
||||
- octodns/octodns-gcore
|
||||
- octodns/octodns-googlecloud
|
||||
- octodns/octodns-hetzner
|
||||
- octodns/octodns-mythicbeasts
|
||||
- octodns/octodns-ns1
|
||||
- octodns/octodns-ovh
|
||||
- octodns/octodns-powerdns
|
||||
- octodns/octodns-rackspace
|
||||
- octodns/octodns-route53
|
||||
- octodns/octodns-selectel
|
||||
- octodns/octodns-transip
|
||||
- octodns/octodns-ultra
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
# This should generally be the latest stable release of python
|
||||
python-version: '3.10'
|
||||
architecture: x64
|
||||
- name: Test Module
|
||||
run: |
|
||||
./script/test-module ${{ matrix.module }}
|
||||
32
script/test-module
Executable file
32
script/test-module
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
module="$1"
|
||||
if [ -z "$module" ]; then
|
||||
echo "Missing required parameter module, e.g. octodns/octodns-powerdns"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX)
|
||||
|
||||
echo "## venv ########################################################################"
|
||||
VENV_PYTHON=$(command -v python3)
|
||||
VENV_NAME="${TMP_DIR}/env"
|
||||
"$VENV_PYTHON" -m venv "$VENV_NAME"
|
||||
. "${VENV_NAME}/bin/activate"
|
||||
echo "## environment & versions ######################################################"
|
||||
python --version
|
||||
pip --version
|
||||
echo "## install octodns from pwd ####################################################"
|
||||
python setup.py install
|
||||
echo "## checkout provider module ####################################################"
|
||||
cd $TMP_DIR
|
||||
git clone "https://github.com/${module}.git"
|
||||
cd $(basename $module)
|
||||
echo "## install module dev requirements #############################################"
|
||||
pip install -e .[dev]
|
||||
export PYTHONPATH=.:$PYTHONPATH
|
||||
echo "## run module tests ############################################################"
|
||||
pytest --disable-network
|
||||
echo "## complete ####################################################################"
|
||||
Reference in New Issue
Block a user