From 8bf12e852fd2285b7eec563f0e5b40dfb26d3d27 Mon Sep 17 00:00:00 2001 From: Ido-Barnea Date: Sat, 2 Mar 2024 10:49:19 +0200 Subject: [PATCH] [trivial] Updated github checkin workflow --- .github/workflows/checkin.yml | 15 +++++++++ .github/workflows/style-checker.yml | 49 ----------------------------- 2 files changed, 15 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/style-checker.yml diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index 839995bd..610583b6 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -10,6 +10,21 @@ on: - synchronize jobs: + Style: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: npm ci + - name: Lint + run: npx nx run-many --target lint --no-cache + - name: Format + run: npx nx format:check Build: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/style-checker.yml b/.github/workflows/style-checker.yml deleted file mode 100644 index 274543d9..00000000 --- a/.github/workflows/style-checker.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: '[🎨] Style Checker' -run-name: '[🎨] Style Checker - ${{ github.head_ref }}' -on: - workflow_dispatch: - pull_request: - types: - - opened - - edited - - reopened - - synchronize - -jobs: - Sanitize: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - run: npm ci - - name: Lint - run: npx nx run-many --target lint --no-cache - - name: Format - run: npx nx format:check - check-commit-message: - name: Check Commit Messages - runs-on: ubuntu-latest - steps: - - name: Get PR Commits - id: 'get-pr-commits' - uses: tim-actions/get-pr-commits@master - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Check Subject Line Length - uses: tim-actions/commit-message-checker-with-regex@v0.3.1 - with: - commits: ${{ steps.get-pr-commits.outputs.commits }} - pattern: '^.{0,75}(\n.*)*$' - error: 'Subject too long (max 75)' - - name: Check Syntax - uses: tim-actions/commit-message-checker-with-regex@v0.3.1 - with: - commits: ${{ steps.get-pr-commits.outputs.commits }} - pattern: '\[#\d+\] [a-zA-Z]+|\[trivial\] [a-zA-Z]+|Merge [a-zA-Z]+' - error: 'Commit messages must start with an issue number. For example "[#21] MESSAGE" or "[trivial] MESSAGE" or "Merge MESSAGE".' - one_pass_all_pass: 'false'