-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(refactor): Replace CI workflow with commitlint
replacing the lab42 image with https://commitlint.js.org/ since the lab42 image was taken down, breaking our GH action docs: Add Architecture Decision Records documentation
- Loading branch information
1 parent
39ff407
commit f17258e
Showing
4 changed files
with
67 additions
and
3 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 |
---|---|---|
|
@@ -25,8 +25,51 @@ jobs: | |
working-directory: ${{ inputs.working_directory }} | ||
runs-on: ${{ inputs.jobs_run_on }} | ||
steps: | ||
- name: Validate PR title | ||
uses: 'lab42/[email protected]' | ||
# - name: Validate PR title | ||
# uses: 'lab42/[email protected]' | ||
# with: | ||
# description_regexp: '(.*)' | ||
- uses: actions/checkout@v3 | ||
with: | ||
description_regexp: '(.*)' | ||
fetch-depth: 0 | ||
- name: Install required dependencies | ||
run: | | ||
sudo apt install -y git curl | ||
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - | ||
sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs | ||
- name: Print versions | ||
run: | | ||
git --version | ||
node --version | ||
npm --version | ||
npx commitlint --version | ||
- name: Install commitlint | ||
run: | | ||
# npm install conventional-changelog-conventionalcommits | ||
# npm install commitlint@latest | ||
npm install --save-dev @commitlint/{cli,config-conventional} | ||
# I hate myself for the below | ||
cat <<- EOF > commitlint.config.ts | ||
import type {UserConfig} from '@commitlint/types'; | ||
import {RuleConfigSeverity} from '@commitlint/types'; | ||
const Configuration: UserConfig = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'subject-case': [0, 'never', []], | ||
'body-max-line-length': [0, 'always', 100], | ||
}, | ||
}; | ||
export default Configuration; | ||
EOF | ||
- name: Validate current commit (last commit) with commitlint | ||
if: github.event_name == 'push' | ||
run: npx commitlint --last --verbose | ||
|
||
- name: Validate PR commits with commitlint | ||
if: github.event_name == 'pull_request' | ||
# yamllint disable-line rule:line-length | ||
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose | ||
timeout-minutes: ${{ inputs.timeout_minutes }} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
. |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 1. Record architecture decisions | ||
|
||
Date: 2024-11-02 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
We need to record the architectural decisions made on this project. | ||
|
||
## Decision | ||
|
||
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). | ||
|
||
## Consequences | ||
|
||
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools). |
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