Skip to content

Commit

Permalink
Test of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt authored Dec 19, 2023
1 parent 5f449a1 commit a261f32
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/dea-intertidal-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,27 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build DEA Intertidal image
timeout-minutes: 20
shell: bash
run: |
docker-compose build
- name: Run dockerized integration tests and copy outputs
run: |
# Set up artifacts directory to house outputs from integration tests,
# giving all users read and write permissions
mkdir artifacts
chmod a+rw artifacts
# Run integration tests using Docker
docker-compose up -d
docker-compose exec -T dea_intertidal /bin/sh -c "sh ./tests/run_tests"
docker-compose down
push_ecr:
needs: [test]
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion intertidal/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
!*.ipynb
!*.sh
!*.yaml
!*.gitignore
!*.yml
!*.in
!*.gitignore
!*.dockerignore
!*Dockerfile
14 changes: 14 additions & 0 deletions tests/integration/test_intertidal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pytest
from click.testing import CliRunner
from intertidal.elevation import intertidal_cli

@pytest.mark.dependency()
def test_intertidal_cli():
runner = CliRunner()
result = runner.invoke(
intertidal_cli,
[
"--help",
],
)
assert result.exit_code == 0
4 changes: 4 additions & 0 deletions tests/run_tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# Run integration tests and generate code coverage
pytest --cov=coastlines --cov-report=xml tests/integration

0 comments on commit a261f32

Please sign in to comment.