chore(deps): React 18, MdxEditor #542
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: Linting | |
on: | |
pull_request: # Run on all pull requests | |
push: | |
branches: # Run on any push to development or main | |
- development | |
- main | |
jobs: | |
eslint: # Lint changed JS/TS files | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 #Checkout the project from git | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(./gradlew pnpmCacheDir -q)" | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Set up JDK 11 # Installs java 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Install dependencies | |
run: ./gradlew pnpmInstall | |
- name: Run eslint on changed files | |
uses: tj-actions/eslint-changed-files@v18 | |
with: | |
config_path: "src/main/webapp/eslint.config.mjs" | |
extra_args: "--max-warnings=0" | |
file_extensions: | | |
src/main/webapp/resources/js/**/*.ts | |
src/main/webapp/resources/js/**/*.tsx | |
src/main/webapp/resources/js/**/*.js | |
src/main/webapp/resources/js/**/*.jsx | |
checkstyle: # Lint changed Java files | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 #Checkout the project from git | |
- name: Set up JDK 11 # Installs java 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run checkstyle | |
uses: dbelyaev/[email protected] | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review | |
fail_on_error: true | |
level: error | |
checkstyle_config: './checkstyle.xml' |