Skip to content

Commit

Permalink
iRODS integration tests (#59)
Browse files Browse the repository at this point in the history
* Remove unnecessary Dockerfile

* Exit irods_client container when running on CI

* Add integration tests for iRODS

* iRODS integration tests: utilize layer caching

* Add dockerignore file
  • Loading branch information
dometto authored Feb 29, 2024
1 parent 97c6ec7 commit 6e7397f
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 55 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
.dockerignore
**/.dockerignore
40 changes: 40 additions & 0 deletions .github/workflows/integration-tests-irods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run integration tests against iRODS

on:
push:
branches:
- develop
pull_request:

jobs:
build:
runs-on: ubuntu-22.04
if: |
${{ ! contains(github.event.head_commit.message, '#nointegrationtests') &&
( github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
)
}}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt install -y docker-compose
- uses: docker/setup-buildx-action@v3
- name: Build utilizing cache
uses: docker/bake-action@v4
with:
load: true
push: false
set: |
irods-catalog.cache-from=type=gha
irods-catalog.cache-to=type=gha
irods-catalog.tags=irods-catalog
irods-catalog-provider.cache-from=type=gha
irods-catalog-provider.cache-to=type=gha
irods-catalog-provider.tags=irods-catalog-provider
irods-client.cache-from=type=gha
irods-client.cache-to=type=gha
irods-client.tags=irods-client
- name: Run tests using docker-compose
run: docker-compose up --no-build --exit-code-from irods-client
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# iBridges
## Development status
[![Python package](https://github.com/UtrechtUniversity/iBridges/actions/workflows/main.yml/badge.svg?branch=develop)](https://github.com/UtrechtUniversity/iBridges/actions/workflows/main.yml) [![Run integration tests against Yoda](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-yoda.yml/badge.svg)](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-yoda.yml)
[![Run integration tests against Yoda](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-irods.yml/badge.svg?branch=develop)](https://github.com/UtrechtUniversity/iBridges/actions/workflows/integration-tests-irods.yml)

## About

Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: '3'

services:
irods-catalog:
image: irods-catalog
build:
context: ./docker/irods_catalog
# 5432 is exposed by default and can conflict with other postgres containers.
Expand All @@ -12,15 +13,19 @@ services:
- POSTGRES_PASSWORD=testpassword

irods-catalog-provider:
image: irods-catalog-provider
build:
context: ./docker/irods_catalog_provider
depends_on:
- irods-catalog

irods-client:
image: irods-client
build:
context: .
dockerfile: ./docker/irods_client/Dockerfile
depends_on:
- irods-catalog-provider
tty: true
environment:
- CI=${CI}
54 changes: 0 additions & 54 deletions docker/irods_catalog_provider/Dockerfile_4.2.12

This file was deleted.

7 changes: 6 additions & 1 deletion docker/irods_client/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ echo $(iadmin lu testuser)

cd /ibridges/integration_test
pytest .
/bin/bash
result=$?
if [[ -z "$CI" ]]; then
/bin/bash
else
exit $result
fi

0 comments on commit 6e7397f

Please sign in to comment.