Merge pull request #847 from gjoseph/renovate/patch-react #7006
This file contains 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: Tichu build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
# By default, a workflow only runs when a pull_request's activity type is opened, synchronize, or reopened | |
# With types: [opened], we only run on open, so further pushes do not re-trigger, to avoid completely overloading CI | |
# types: [opened] | |
# Unfortunately, manual triggers do not propagate to PR checks :| | |
# TODO: alternatively, we could branches-ignore: [renovate/**] but that would need to be on the push event? | |
branches: [main] | |
# Enable manual triggers: | |
workflow_dispatch: | |
jobs: | |
build-backend: | |
name: Backend w/ Java ${{ matrix.java-version }} ${{ matrix.java-distrib }} ${{ matrix.experimental && 'π§ͺ' || 'π' }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} # if experimental, don't fail the whole job | |
strategy: | |
fail-fast: true # cancel other jobs if one in matrix fails | |
matrix: | |
# the first item in the versions list exists only to match .tool-versions | |
java-version: ["21.0.5+11.0.LTS", "21"] | |
java-distrib: ["temurin"] | |
experimental: [false] | |
include: | |
# not sure why 23 doesn't build yet, issue with immutables maybe | |
- java-version: 23 | |
java-distrib: temurin | |
experimental: true | |
# graalvm doesn't have 23 yet? | |
- java-version: 21 | |
java-distrib: graalvm | |
experimental: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
name: Set up Java environment | |
with: | |
java-version: "${{ matrix.java-version }}" | |
distribution: "${{ matrix.java-distrib }}" | |
cache: "maven" | |
- name: Backend Build | |
run: ./mvnw clean verify -B -V -Darchunit.freeze.store.default.allowStoreUpdate=false | |
- name: OpenRewriteCheck | |
run: ./mvnw rewrite:dryRun -DfailOnDryRunResults=true # Ensure no OpenRewrite rule/change hasn't been committed | |
build-frontend: | |
name: Frontend ${{ matrix.npm-command }} π | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # continue other jobs if one in matrix fails | |
matrix: | |
npm-command: [ | |
"lint", | |
"build", | |
"test", # while tichu-client-ts-lib and tichu-term-client use ava and run tests after compiling main code, that's not the case for tichu-web, so running test additionally here | |
"prettier-check-all", | |
"web-build-storybook", # we want to build storybook to ensure it continues working, while we have no tests for it | |
] | |
defaults: | |
run: | |
working-directory: ./tichu-clients | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "./.tool-versions" | |
cache: "npm" | |
cache-dependency-path: "./tichu-clients/package-lock.json" | |
# Override npm installed above with version specified in package.json | |
- run: ./npm-setup.sh | |
- run: npm install | |
- run: npm run ${{ matrix.npm-command }} |