Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub workflow to run tests #25

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*
!hls_vi/
!tests/
tests/fixtures/
!setup.py
!tox.ini
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY = build test

build:
docker compose build

test:
docker compose run --build tox
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ where:
You can run tests using Docker:

```bash
docker compose run --build tox
make test
```
2 changes: 2 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
services:
tox:
build: .
volumes:
- ${PWD}/tests/fixtures:/hls_vi/tests/fixtures