From 90f0e2e5df75754b0e2eeb330d121077a8f1f19b Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Thu, 19 Sep 2019 23:39:46 +0100 Subject: [PATCH] Maybe this will work? --- .github/workflows/test.yml | 20 ++++++++++++++++++++ Dockerfile.windows | 7 +++++++ docker-compose.yml | 19 +++++++++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 Dockerfile.windows diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4287993..125d7a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,26 @@ jobs: - run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull ${{ matrix.compose_app }} - run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run ${{ matrix.compose_app }} + sqlite-windows: + name: sqlite-windows + strategy: + fail-fast: false + matrix: + python_version: + - 3.6-windowsservercore-ltsc2016 + - 3.7-windowsservercore-ltsc2016 + runs-on: windows-latest + steps: + - uses: actions/checkout@master + - run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django + - run: docker-compose pull --include-deps sqlite || true + - run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull sqlite + env: + PYTHON_VERSION: ${{ matrix.python_version }} + - run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run sqlite + env: + PYTHON_VERSION: ${{ matrix.python_version }} + sqlite: name: sqlite strategy: diff --git a/Dockerfile.windows b/Dockerfile.windows new file mode 100644 index 0000000..9f95f7e --- /dev/null +++ b/Dockerfile.windows @@ -0,0 +1,7 @@ +ARG PYTHON_VERSION +FROM python:${PYTHON_VERSION} + +COPY --chown=test:test tests/requirements/ c:/requirements/ +RUN $files = @(Get-ChildItem c:\requirements\*.txt); \ + foreach ($file in $files) { pip install -r $file }; \ + pip install flake8 flake8-isort sphinx pyenchant sphinxcontrib-spelling selenium unittest-xml-reporting diff --git a/docker-compose.yml b/docker-compose.yml index 1c27373..49bc08d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,13 +30,28 @@ x-postgres-base: &postgres-base services: sqlite: <<: *base - environment: - - DJANGO_SETTINGS_MODULE=settings.test_sqlite + build: + context: ${DJANGO_PATH} + dockerfile: ${PWD}/Dockerfile entrypoint: python tests/runtests.py depends_on: - memcached - memcached2 + sqlite-windows: + <<: *base + build: + context: ${DJANGO_PATH} + dockerfile: ${PWD}/Dockerfile.windows + args: + - PYTHON_VERSION=${PYTHON_VERSION} + environment: + - DJANGO_SETTINGS_MODULE=settings.test_sqlite + entrypoint: python tests/runtests.py + depends_on: + - memcached + - memcached2 + sqlite-gis: <<: *base entrypoint: python tests/runtests.py