From 01a0bd8270c5f50b56418311c7cba1f400f171f1 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 9 Apr 2024 18:27:55 +0100 Subject: [PATCH 1/5] add workflows to run the tests --- .github/workflows/tests.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..b5e951b0 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,35 @@ +# Run the tests +--- +name: Test + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Setup docker + if: runner.os == 'macos' + run: | + brew install docker + brew install docker-compose + - name: Symlink (compose is now a cli-plugins) + if: runner.os == 'macos' + run: | + mkdir -p ~/.docker/cli-plugins + ln -sfn /usr/local/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose + - name: Start docker + if: runner.os == 'macos' + run: colima start + - name: Run matlab tests + if: runner.os != 'windows' + run: | + docker run -t openmicroscopy/bio-formats-octave src/main/matlab/bftest.m From 54635e7b983115283ff9e19faa00d57f9a12337d Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 9 Apr 2024 18:28:23 +0100 Subject: [PATCH 2/5] ignore .gradle file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 926b6250..cacbeb90 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store target .idea +.gradle From f100547f9f3b9182fadf5977192c83a99876120e Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 10 Apr 2024 15:26:39 +0100 Subject: [PATCH 3/5] mount src --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5e951b0..6f653dc6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,4 +32,4 @@ jobs: - name: Run matlab tests if: runner.os != 'windows' run: | - docker run -t openmicroscopy/bio-formats-octave src/main/matlab/bftest.m + docker run -t -v $(pwd)/src/:/src/ openmicroscopy/bio-formats-octave /src/main/matlab/bftest.m From 5fb607d76c89f1f4db59d94107a4e1739a00a117 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 10 Apr 2024 15:32:52 +0100 Subject: [PATCH 4/5] remove check --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6f653dc6..bd42c6f7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,5 @@ jobs: if: runner.os == 'macos' run: colima start - name: Run matlab tests - if: runner.os != 'windows' run: | docker run -t -v $(pwd)/src/:/src/ openmicroscopy/bio-formats-octave /src/main/matlab/bftest.m From 38461a5ae9537592f3afaf52b359647bacb823da Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 10 Apr 2024 16:49:08 +0100 Subject: [PATCH 5/5] load package --- .github/workflows/tests.yml | 1 + src/main/matlab/bftest.m | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bd42c6f7..cdb1926a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,4 +31,5 @@ jobs: run: colima start - name: Run matlab tests run: | + #sed -i.bak '1s/^/pkg load bioformats\n /' src/main/matlab/bftest.m docker run -t -v $(pwd)/src/:/src/ openmicroscopy/bio-formats-octave /src/main/matlab/bftest.m diff --git a/src/main/matlab/bftest.m b/src/main/matlab/bftest.m index f6fec557..89faa934 100644 --- a/src/main/matlab/bftest.m +++ b/src/main/matlab/bftest.m @@ -1,3 +1,6 @@ +% Load Bio-Formats +pkg load bioformats + bfCheckJavaPath(); % Create local file for testing