From 92b3608ef2f62a9eac3f48e167d48afd3797477b Mon Sep 17 00:00:00 2001 From: Ashna Abraham Date: Wed, 10 Jul 2024 15:42:16 +0100 Subject: [PATCH 1/2] Linter Action --- .github/workflows/linter.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..6d1e884a --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,28 @@ +name: Checkstyle + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + checkstyle: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Install dependencies + run: mvn install + + - name: Run checkstyle + run: mvn checkstyle:check \ No newline at end of file From 50fa44e4f585d316743d415a62573b9710aaad8e Mon Sep 17 00:00:00 2001 From: Ashna Abraham Date: Wed, 10 Jul 2024 16:03:33 +0100 Subject: [PATCH 2/2] linting retry --- .github/workflows/linter.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 6d1e884a..c4b8d2f5 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,4 +1,4 @@ -name: Checkstyle +name: Run Linter on: push: @@ -9,20 +9,22 @@ on: - main jobs: - checkstyle: + linter: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 with: - java-version: '17' - distribution: 'temurin' - cache: maven + node-version: 20.14.0 - name: Install dependencies - run: mvn install + run: npm install + + - name: Run linter + run: npm run linter + - - name: Run checkstyle - run: mvn checkstyle:check \ No newline at end of file