fix: Some random code for sanity checking #7
Workflow file for this run
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: Pull Requests | |
on: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: webiny/[email protected] | |
- name: Increment version | |
id: increment-version | |
uses: RichardInnocent/[email protected] # TODO: find something better or fork | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "21" | |
distribution: "temurin" | |
cache: maven | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
# with: | |
# cache: npm | |
- name: Run OpenRewrite # TODO : open pr with all changes | |
run: ./mvnw rewrite:run -Drevision='${{ steps.increment-version.outputs.new-version }}' -Dchangelist='-SNAPSHOT' -P ci | |
- name: Check if there are refactored changes | |
id: changes-openrewrite | |
uses: UnicornGlobal/[email protected] | |
- name: Process refactoring changes | |
if: steps.changes-openrewrite.outputs.changed == 1 | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('Repository was dirty after refactoring pass') | |
- name: Run Spotless # TODO : open pr with all changes | |
run: ./mvnw spotless:apply -Drevision='${{ steps.increment-version.outputs.new-version }}' -Dchangelist='-SNAPSHOT' -P ci | |
- name: Check if there are style changes | |
id: changes-spotless | |
uses: UnicornGlobal/[email protected] | |
- name: Process lint changes | |
if: steps.changes-spotless.outputs.changed == 1 | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('Repository was dirty after lint pass') | |
- name: Build with Maven | |
run: ./mvnw -B package -Drevision='${{ steps.increment-version.outputs.new-version }}' -Dchangelist='-SNAPSHOT' --file pom.xml -P ci |