diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5608592..36825e9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,4 +4,32 @@ on: [workflow_dispatch, pull_request, push] jobs: test: runs-on: ubuntu-latest - steps: [uses: fastai/workflows/nbdev-ci@master] + steps: + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: '>=1.21.0' + + - name: Install xcaddy + run: go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest + + - name: Build caddy with cloudflare plugin + run: | + cd ~/go/bin + ./xcaddy build --with github.com/caddy-dns/cloudflare + + - name: Start caddy for testing + run: | + ~/go/bin/caddy run & + sleep 5 # Give caddy time to start + + - name: Run nbdev tests + env: + CLOUDFLARE_API_TOKEN: DUMMY_TOKEN + uses: fastai/workflows/nbdev-ci@master + with: + flags: "--skip_file_re \"index|test_\"" + + - name: Stop caddy + run: pkill caddy + diff --git a/settings.ini b/settings.ini index 083b813..4b28b1b 100644 --- a/settings.ini +++ b/settings.ini @@ -5,7 +5,7 @@ version = 0.0.4 min_python = 3.7 license = apache2 black_formatting = False -requirements = fastcore httpx +requirements = fastcore httpx cloudflare rich doc_path = _docs lib_path = fastcaddy nbs_path = nbs