Skip to content

Commit

Permalink
Add GitHub workflow to run tests
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
chuckwondo committed Jul 15, 2024
1 parent 57dff7c commit f7c935f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 3 deletions.
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

0 comments on commit f7c935f

Please sign in to comment.