From 127f8fef6536632f9502c34481df8e8ea2262913 Mon Sep 17 00:00:00 2001 From: Nico Stuurman Date: Tue, 16 Jun 2026 09:32:07 -0700 Subject: [PATCH] Workflow to test PRs before they will ber merged. --- .github/workflows/pr_tests.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/pr_tests.yml diff --git a/.github/workflows/pr_tests.yml b/.github/workflows/pr_tests.yml new file mode 100644 index 0000000..a1c07ce --- /dev/null +++ b/.github/workflows/pr_tests.yml @@ -0,0 +1,36 @@ +# Runs the unit tests on every pull request (and on pushes to main). +# These tests are native-free (they use a fake CMMCore), so they run on a +# stock CI runner without the MMCoreJ native library. The native-dependent +# TestAcquisitionEvent is excluded via the maven-surefire-plugin config in +# pom.xml. + +name: PR tests + +on: + pull_request: + push: + branches: + - main + +# Cancel an in-progress run if a new commit is pushed to the same ref. +concurrency: + group: pr-tests-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Maven tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: 'zulu' + cache: maven + + - name: Run tests + run: mvn --batch-mode test