-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(workflows): [
ci
] add commitlint
job
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
d139c70
commit a31805b
Showing
1 changed file
with
44 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HUSKY: 0 | ||
REF: ${{ github.head_ref || github.ref_name }} | ||
SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
@@ -82,9 +83,35 @@ jobs: | |
- id: version-typescript | ||
name: Get TypeScript version | ||
run: echo "result=$(jq .devDependencies.typescript package.json -r)" >> $GITHUB_OUTPUT | ||
gitguardian: | ||
commitlint: | ||
needs: metadata | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkout | ||
name: Checkout ${{ env.REF }} | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ env.REF }} | ||
- id: node | ||
name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
node-version-file: .nvmrc | ||
- id: cache | ||
name: Restore dependencies cache | ||
uses: actions/[email protected] | ||
with: | ||
key: ${{ runner.os }}-${{ github.run_id }} | ||
path: ${{ env.CACHE_PATH }} | ||
- id: lint | ||
name: Check commitlint status | ||
run: yarn commitlint --from $SHA~${{ github.event.pull_request.commits || 1 }} --to $SHA | ||
gitguardian: | ||
needs: commitlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkout | ||
name: Checkout ${{ env.REF }} | ||
|
@@ -104,7 +131,9 @@ jobs: | |
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }} | ||
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} | ||
format: | ||
needs: gitguardian | ||
needs: | ||
- commitlint | ||
- gitguardian | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkout | ||
|
@@ -129,7 +158,9 @@ jobs: | |
name: Check code formatting | ||
run: yarn check:format | ||
lint: | ||
needs: gitguardian | ||
needs: | ||
- commitlint | ||
- gitguardian | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkout | ||
|
@@ -154,7 +185,9 @@ jobs: | |
name: Check lint status | ||
run: yarn check:lint | ||
spelling: | ||
needs: gitguardian | ||
needs: | ||
- commitlint | ||
- gitguardian | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkout | ||
|
@@ -180,6 +213,7 @@ jobs: | |
run: yarn check:spelling | ||
typescript: | ||
needs: | ||
- commitlint | ||
- gitguardian | ||
- metadata | ||
runs-on: ubuntu-latest | ||
|
@@ -224,7 +258,9 @@ jobs: | |
name: Run typecheck | ||
run: yarn typecheck | ||
test: | ||
needs: gitguardian | ||
needs: | ||
- commitlint | ||
- gitguardian | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
@@ -266,18 +302,19 @@ jobs: | |
flags: ${{ format('node{0}', matrix.node-version) }} | ||
override_branch: ${{ env.REF }} | ||
override_build: ${{ github.run_id }} | ||
override_commit: ${{ env.GITHUB_SHA }} | ||
override_commit: ${{ env.SHA }} | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true | ||
env: | ||
GITHUB_JOB: ${{ github.job }} | ||
GITHUB_REF: ${{ github.ref }} | ||
GITHUB_REF_TYPE: ${{ github.ref_type }} | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
GITHUB_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
GITHUB_SHA: ${{ env.SHA }} | ||
GITHUB_WORKSPACE: ${{ github.workspace }} | ||
build: | ||
needs: | ||
- commitlint | ||
- gitguardian | ||
- metadata | ||
runs-on: ubuntu-latest | ||
|