diff --git a/.dockerignore b/.dockerignore index 1fbaf8a..6cdb0c4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ * !hls_vi/ !tests/ +tests/fixtures/ !setup.py !tox.ini diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..eb7dbf0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3415e3c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,14 @@ +name: Test + +on: [push, workflow_dispatch] + +jobs: + tox_in_docker: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Run tests in Docker container + run: make test diff --git a/Dockerfile b/Dockerfile index 61b7370..5e64abe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,8 @@ RUN : \ python3-venv \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ - && pip3 install --no-cache --upgrade pip setuptools \ - && pip3 install --no-cache rasterio==1.1.3 tox tox-venv --no-binary rasterio \ + && pip3 install --no-cache-dir --upgrade pip setuptools \ + && pip3 install --no-cache-dir rasterio==1.1.3 tox tox-venv --no-binary rasterio \ && : WORKDIR /hls_vi diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6044966 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +.PHONY = build test + +build: + docker compose build + +test: + docker compose run --build tox diff --git a/README.md b/README.md index d5f8b96..22691bc 100644 --- a/README.md +++ b/README.md @@ -38,5 +38,5 @@ where: You can run tests using Docker: ```bash -docker compose run --build tox +make test ``` diff --git a/compose.yaml b/compose.yaml index 1cf2001..4096d4b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,3 +1,5 @@ services: tox: build: . + volumes: + - ${PWD}/tests/fixtures:/hls_vi/tests/fixtures