From cfafe97988ed85383ca7ffa0361de00cdf7fa79e Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 4 Dec 2020 10:31:35 +0000 Subject: [PATCH 01/11] add actions --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..afce4645 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +# Builds using ansible +--- +name: Build + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' + +jobs: + build: + runs-on: ubuntu-latest + env: + compose_file:docker-compose.yml:volumes.yml + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Add variable + run: | + run: echo "${{ env.compose_file }}" >> $GITHUB_PATH + - name: Set up + run: | + mkdir /tmp/omero-app + cp -r . /tmp/omero-app/.omero + - name: Build + run: | + cd /tmp/omero-app + .omero/compose up -d + .omero/compose down + .omero/persist.sh backup + .omero/persist.sh --restore backup \ No newline at end of file From c37d32fa5bdd38bc5df5b91f02d73f288c8ae4c2 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 4 Dec 2020 10:34:05 +0000 Subject: [PATCH 02/11] review config --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index afce4645..88008f5b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,8 +11,6 @@ on: jobs: build: runs-on: ubuntu-latest - env: - compose_file:docker-compose.yml:volumes.yml steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python }} @@ -21,7 +19,8 @@ jobs: python-version: ${{ matrix.python }} - name: Add variable run: | - run: echo "${{ env.compose_file }}" >> $GITHUB_PATH + run: | + echo "COMPOSE_FILE=docker-compose.yml:volumes.yml" >> $GITHUB_PATH - name: Set up run: | mkdir /tmp/omero-app From 7fde4b34642380c4170baedaefd47cb3267dfb92 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 4 Dec 2020 10:52:12 +0000 Subject: [PATCH 03/11] remove ref to travis --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 672d02d8..ed2163f7 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ OMERO Test Infra for projects that are built on OMERO.server or OMERO.web. Any repository that relies on an existing OMERO installation -can depend on this directory whether for testing in travis +can depend on this directory whether for testing in CI system or locally. The are a number of [examples](#examples) which are run -regularly by Travis CI. +regularly by CI. Setup ----- @@ -56,7 +56,7 @@ It is also possible to combine several application e.g. but each of the applications must pass when it is run alone as well. These commands should be invoked by the `script` step in the project's -.travis.yml file. Set any environment variables as necessary. +.omero_plugin.yml file. Set any environment variables as necessary. Extension mechanisms -------------------- @@ -156,7 +156,7 @@ Run the linter, install, run tests Remember, you may need to set some environment variables to ensure your plugin is discovered and tested correctly. -If you are modifying an existing plugin see `.travis.yml` for the required variables. +If you are modifying an existing plugin see `.omero_plugin.yml` for the required variables. Trouble-shooting ---------------- @@ -198,5 +198,5 @@ Examples - https://github.com/ome/scripts You can find more examples by searching for -"[openmicroscopy/omero-test-infra filename:.travis.yml](https://github.com/search?q=openmicroscopy%2Fomero-test-infra+filename%3A.travis.yml&type=Code)" +"[ome/omero-test-infra filename:.omero_plugin.yml](https://github.com/search?q=openmicroscopy%2Fomero-test-infra+filename%3A.omero_plugin.yml&type=Code)" on GitHub.com. From 992f1465734610585f25613e3e2a942580b04373 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 4 Dec 2020 10:55:20 +0000 Subject: [PATCH 04/11] remove travis file --- .travis.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0c0374e2..00000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: python -python: 2.7 - -virtualenv: - system_site_packages: true - -sudo: required - -services: - - docker - -# Use Travis to test the persist/restore -# workflow since that is not currently -# tested elsewhere. - -env: - - COMPOSE_FILE=docker-compose.yml:volumes.yml - -before_install: - - mkdir /tmp/omero-app - - cp -r . /tmp/omero-app/.omero - - cd /tmp/omero-app - -script: - - cd /tmp/omero-app - - .omero/compose up -d - - sleep 10 - - .omero/compose down - - .omero/persist.sh backup - - .omero/persist.sh --restore backup From 7028ea11051c244358fc381c42a1121648d1a092 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 4 Dec 2020 11:14:40 +0000 Subject: [PATCH 05/11] uddate doc --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88008f5b..28e59799 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -# Builds using ansible +# Builds using docker --- name: Build From d3897ae7e97b79dfd047b0e19ebcceb44c85e1d4 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 8 Dec 2020 12:03:01 +0000 Subject: [PATCH 06/11] fix typo and use correct file --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed2163f7..14d036f5 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ Run the linter, install, run tests Remember, you may need to set some environment variables to ensure your plugin is discovered and tested correctly. -If you are modifying an existing plugin see `.omero_plugin.yml` for the required variables. +If you are modifying an existing plugin see `main.yml` for the required variables. Trouble-shooting ---------------- @@ -198,5 +198,5 @@ Examples - https://github.com/ome/scripts You can find more examples by searching for -"[ome/omero-test-infra filename:.omero_plugin.yml](https://github.com/search?q=openmicroscopy%2Fomero-test-infra+filename%3A.omero_plugin.yml&type=Code)" +"[ome/omero-test-infra filename:omero_plugin.yml](https://github.com/search?q=openmicroscopy%2Fomero-test-infra+filename%3Aomero_plugin.yml&type=Code)" on GitHub.com. From d51b3faa902f79371196d6ff4e1fd5776922c06b Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 8 Dec 2020 12:19:22 +0000 Subject: [PATCH 07/11] add extra line --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 28e59799..59f37747 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,4 +31,4 @@ jobs: .omero/compose up -d .omero/compose down .omero/persist.sh backup - .omero/persist.sh --restore backup \ No newline at end of file + .omero/persist.sh --restore backup From 27f9bbc086f9382524f62fb8cc422455821a6498 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 8 Dec 2020 21:41:38 +0000 Subject: [PATCH 08/11] add badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 14d036f5..1d9daed7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ OMERO Test Infra ================ +[![Actions Status](https://github.com/ome/omero-test-infra/workflows/Build/badge.svg)](https://github.com/ome/omero-test-infra/actions) + `omero-test-infra` provides simplified integration testing for projects that are built on OMERO.server or OMERO.web. From d255e9c7ccf9854ec2a1f749aa477afee3243960 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 9 Dec 2020 09:40:30 +0000 Subject: [PATCH 09/11] drop extra dot --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d9daed7..5e37e143 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ It is also possible to combine several application e.g. but each of the applications must pass when it is run alone as well. These commands should be invoked by the `script` step in the project's -.omero_plugin.yml file. Set any environment variables as necessary. +omero_plugin.yml file. Set any environment variables as necessary. Extension mechanisms -------------------- From beb6c44eb007de6e54dd6741edfdf93b91c24386 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 9 Dec 2020 09:42:28 +0000 Subject: [PATCH 10/11] fix query --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e37e143..2ce51308 100644 --- a/README.md +++ b/README.md @@ -200,5 +200,5 @@ Examples - https://github.com/ome/scripts You can find more examples by searching for -"[ome/omero-test-infra filename:omero_plugin.yml](https://github.com/search?q=openmicroscopy%2Fomero-test-infra+filename%3Aomero_plugin.yml&type=Code)" +"[ome/omero-test-infra filename:omero_plugin.yml](https://github.com/search?q=ome%2Fomero-test-infra+filename%3Aomero_plugin.yml&type=Code)" on GitHub.com. From a28faa37199a0b8023a26129515b89e47fb90664 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 9 Dec 2020 10:09:13 +0000 Subject: [PATCH 11/11] remove confusing line --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2ce51308..b38a1902 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ regularly by CI. Setup ----- -The directory MUST BE located at .omero at the top-level of +The directory MUST BE located at `.omero` at the top-level of your source code. This can be achieved most simply by: ``` @@ -35,9 +35,9 @@ production docker images. The definition of the stack is available in `docker-compose.yml` with a number of environment variables being specified in `.env`. -All docker compose environment variables like COMPOSE_FILE will be -respected, except for COMPOSE_PROJECT_NAME which has special handling -via the PROJECT environment variable. +All docker compose environment variables like `COMPOSE_FILE` will be +respected, except for `COMPOSE_PROJECT_NAME` which has special handling +via the `PROJECT` environment variable. Docker commands --------------- @@ -58,7 +58,7 @@ It is also possible to combine several application e.g. but each of the applications must pass when it is run alone as well. These commands should be invoked by the `script` step in the project's -omero_plugin.yml file. Set any environment variables as necessary. +`omero_plugin.yml` file. Set any environment variables as necessary. Extension mechanisms -------------------- @@ -156,9 +156,7 @@ Run the linter, install, run tests .omero/docker dev run --user cli build ``` Remember, you may need to set some environment variables to ensure your plugin -is discovered and tested correctly. - -If you are modifying an existing plugin see `main.yml` for the required variables. +is discovered and tested correctly. See `docker`. Trouble-shooting ----------------