Test against SDK main #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test against SDK main | |
| # Exercises the example app against the unreleased Castle Java SDK (main | |
| # branch). castle-java 3.0.0 is consumed as a Maven artifact, so we clone, | |
| # build and install the SDK main branch into the local repository and run | |
| # the example against it. | |
| # | |
| # This is the permanent test/sdk-main branch: every push to it runs the suite | |
| # against the latest main. Nightly/manual runs require this file to also live | |
| # on the default branch (GitHub only honours schedule/workflow_dispatch from | |
| # the default branch). | |
| on: | |
| push: | |
| branches: [test/sdk-main] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 6 * * *" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out example | |
| uses: actions/checkout@v5 | |
| with: | |
| path: example | |
| - name: Set up Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: example/package-lock.json | |
| - run: npm ci | |
| working-directory: example | |
| - name: Check out castle-java SDK | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: castle/castle-java | |
| ref: main | |
| path: castle-java | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: maven | |
| - name: Install castle-java from main | |
| run: mvn -B -ntp -f castle-java/pom.xml install -DskipTests -Dmaven.javadoc.skip=true | |
| - name: Build and test example | |
| working-directory: example | |
| run: mvn -B -ntp verify |