Skip to content

Linting branch refs/heads/bug_13574_wrong_icon #2955

Linting branch refs/heads/bug_13574_wrong_icon

Linting branch refs/heads/bug_13574_wrong_icon #2955

Workflow file for this run

name: Lint
run-name: Linting branch ${{ github.ref }}
on: [push]
jobs:
lint-frontend:
name: Lint Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.20.3'
- name: Check missing icon in icomoon
run: ./tools/check_icomoon.sh
# Only install prettier globally (with same version as in package.json)
- name: Install Prettier
working-directory: ui/ui-frontend
run: npm i -g prettier@$(jq -r '.devDependencies.prettier' package.json)
- name: Lint ui-frontend with Prettier
working-directory: ui/ui-frontend # We only run Prettier linting and not ESLint in that GitHub Action because it would require to install project's dependencies. ESLint is run in "build-and-test" GitHub Action
run: npm run prettier:ci
lint-backend:
name: Lint Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Restore maven cache # We're not using cache feature from actions/setup-java as it could conflict with other GitHub Actions maven caches (our cache doesn't include all Vitam dependencies: it is limited to spotless and its dependencies)
uses: actions/cache@v4
with:
path: |
~/.m2/repository
**/target/spotless-prettier-node-modules-*
key: maven-spotless-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} # We invalidate cache if pom.xml change to detect spotless version update or new maven modules
- name: Lint Java
run: mvn -T1C spotless:check
check-colors:
name: Check colors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check colors
run: ./tools/check-colors.sh
check-shadows:
name: Check shadows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check shadows
run: ./tools/check-shadows.sh