Skip to content

Commit

Permalink
chore: run linting on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kabaros committed Dec 3, 2024
1 parent fa94c07 commit bfa34f8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 30 deletions.
36 changes: 6 additions & 30 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,10 @@ on:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: JulienKode/[email protected]
with:
configuration-path: ${{ steps.commitlint.outputs.config_path }}

lint:
uses: dhis2/workflows-platform/.github/workflows/lint.yml@v1
with:
node-version: 16
cache: 'yarn'
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: wagoid/commitlint-github-action@v4
with:
configFile: ${{ steps.commitlint.outputs.config_path }}
uses: dhis2/workflows-platform/.github/workflows/lint-commits.yml@v1
13 changes: 13 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: lint-pr-title

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
lint-pr-title:
uses: dhis2/workflows-platform/.github/workflows/lint-pr-title.yml@v1
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"test:server": "yarn workspace server test",
"test:client": "yarn workspace client test",
"clone": "yarn workspace tools clone",
"lint": "d2-style check",
"lint:staged": "d2-style check --staged",
"format": "yarn format:js && yarn format:text",
"format:staged": "yarn format:js --staged && yarn format:text --staged",
"format:js": "d2-style apply js",
Expand Down

0 comments on commit bfa34f8

Please sign in to comment.