Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/actions/setup-install/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'setup and install'
description: 'Setup Node and Install Dependencies'
runs:
using: 'composite'
steps:
- name: Setup Node
uses: ./.github/actions/setup-node

- name: Restore cached node_modules
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
shell: bash
run: make install
15 changes: 15 additions & 0 deletions .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'setup node'
description: 'Setup Node'
runs:
using: 'composite'
steps:
- name: Enable Corepack
shell: bash
run: corepack enable

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: yarn.lock
18 changes: 6 additions & 12 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
name: Commitlint
name: 🔍 Commit Checks
on:
push:
branches-ignore:
- main

jobs:
commitlint:
name: 🧾 Linting Commit
runs-on: ubuntu-24.04
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Checkout
uses: actions/checkout@v4

- name: Fetch main
run: git fetch --no-tags --depth=50 origin main

- name: Install dependencies
run: make install
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install

- name: Commitlint
run: npx commitlint --color --verbose --from $(git merge-base origin/main HEAD)
16 changes: 8 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: 🚀 Deploy
on:
push:
branches:
Expand All @@ -10,12 +10,11 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: ./.github/actions/setup-node

- name: Fetch tags
run: git fetch --tags origin release
Expand All @@ -24,7 +23,8 @@ jobs:
- run: git config --global user.name "GitHub CI bot"
- run: git config --global user.email "[email protected]"

- run: make install
- name: Install Dependencies
run: make install

- name: Authenticate npm
run: ./bin/ci/npm-auth.sh
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/git.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Git Checks
name: 🔍 Git Checks

on: [pull_request]

jobs:
block-fixup:
block-fixup-merge:
name: 🚫 Merge Blocked by Git Fixup
runs-on: ubuntu-24.04

steps:
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: 🔍 Code Quality Checks

on:
push:
Expand All @@ -12,24 +12,17 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Checkout
uses: actions/checkout@v4

- name: Fetch main
run: git fetch --no-tags --depth=50 origin main
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install

- name: Install dependencies
run: make install

- name: Lint
- name: 📐 Code Linting
run: yarn lint

- name: Check code-style format
- name: 💅 Code Formatting
run: yarn format

- name: Test packages
- name: 🧪 Testing Packages
run: yarn packages:test
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export NODE_OPTIONS := --trace-deprecation

# On CI servers, use the `npm ci` installer to avoid introducing changes to the package-lock.json
# On developer machines, prefer the generally more flexible `npm install`. 💪
YARN_I := $(if $(CI), install --frozen-lockfile, install)
YARN_I := $(if $(CI), install --immutable --inline-builds, install)

# Modify these variables in local.mk to add flags to the commands, ie.
# YARN_FLAGS += --prefer-offline
Expand Down Expand Up @@ -37,8 +37,8 @@ install: node_modules ## install dependencies

.PHONY: outdated
outdated: ## get list of all outdated packages
yarn outdated || true
lerna exec "yarn outdated || true"
yarn upgrade-interactive || true
lerna exec "yarn upgrade-interactive || true"

.PHONY: unlock
unlock: pristine ## recreates the lockfile
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"prepare": "is-ci || husky"
},
"devDependencies": {
"commitlint-cli": "1.1.3",
"@commitlint/cli": "19.8.1",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.2",
"eslint-import-resolver-node": "0.3.9",
Expand All @@ -48,6 +48,8 @@
"remark-cli": "12.0.1",
"remark-preset-lint-consistent": "6.0.1",
"remark-preset-lint-markdown-style-guide": "6.0.1",
"remark-preset-lint-recommended": "7.0.1"
}
"remark-preset-lint-recommended": "7.0.1",
"textlint": "15.2.1"
},
"packageManager": "[email protected]"
}
Loading