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/commitlint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Commit Lint
description: Validate current commit (last commit) or PR commits with commitlint

runs:
using: composite
steps:
- uses: ./.github/actions/setup-node

- name: Validate current commit (last commit) with commitlint
shell: bash
if: github.event_name == 'push'
run: yarn commitlint --last --verbose

- name: Validate PR commits with commitlint
shell: bash
if: github.event_name == 'pull_request'
run:
yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to
${{ github.event.pull_request.head.sha }} --verbose
11 changes: 11 additions & 0 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Run Linters
description: Run linter

runs:
using: composite
steps:
- uses: ./.github/actions/setup-node

- name: Run Linters
shell: bash
run: yarn lint:check
11 changes: 11 additions & 0 deletions .github/actions/tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Run Tests
description: Run tests

runs:
using: composite
steps:
- uses: ./.github/actions/setup-node

- name: Run Tests
shell: bash
run: yarn test --ci
11 changes: 11 additions & 0 deletions .github/actions/typecheck/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Run Typecheck
description: Run typecheck

runs:
using: composite
steps:
- uses: ./.github/actions/setup-node

- name: Run Typecheck
shell: bash
run: yarn tsc --noEmit
23 changes: 23 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Commit Lint

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

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

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/commitlint
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

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

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/lint
30 changes: 22 additions & 8 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
- major
- minor
- patch
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
install:
Expand All @@ -30,24 +35,32 @@ jobs:
needs: install
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node

- name: Test
run: yarn test
- uses: ./.github/actions/tests

lint:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/lint

- name: Lint
run: yarn lint:check
typecheck:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/typecheck

commitlint:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/commitlint

release:
runs-on: ubuntu-latest
needs: [test, lint]
needs: [test, lint, typecheck, commitlint]
permissions:
contents: write
id-token: write # REQUIRED FOR OIDC
Expand All @@ -57,6 +70,7 @@ jobs:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ssh-key: ${{ secrets.SELF_DEPLOY_KEY }}
- uses: ./.github/actions/setup-node

- name: Configure Git
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

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

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/tests
20 changes: 20 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Typecheck

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

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

jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/typecheck
Loading