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
202 changes: 0 additions & 202 deletions .eslintrc.js

This file was deleted.

37 changes: 3 additions & 34 deletions .github/actions/cached-deps/action.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,8 @@
name: Get & Cache Dependencies
description: Get dependencies via yarn and cache them
inputs:
caching:
description: Whether to cache dependencies or not
required: false
default: 'true'
outputs:
used-cache:
description: Whether the cache was used
value: ${{ steps.install.outputs.cache }}
name: Install Dependencies
description: Install dependencies from the frozen Yarn lockfile
runs:
using: composite
steps:
- name: Cache dependencies
if: inputs.caching == 'true'
id: cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-${{ env.cache-name }}-
${{ runner.OS }}-yarn-
${{ runner.OS }}-

- name: Install
if: steps.cache.outputs.cache-hit != 'true' || inputs.caching != 'true'
id: install
run: |
yarn install --frozen-lockfile
echo "cache='${{ inputs.caching }}'" >> $GITHUB_OUTPUT
shell: bash

- name: Postinstall
if: steps.cache.outputs.cache-hit == 'true' && inputs.caching == 'true'
id: postinstall
run: yarn postinstall
run: yarn install --frozen-lockfile
shell: bash
26 changes: 17 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- 'v*'

permissions:
contents: read
packages: write

jobs:
install-and-build:
name: 🛠️ Install & Build
Expand All @@ -17,7 +21,8 @@ jobs:
- name: 🗜️ Setup node version
uses: actions/setup-node@v6
with:
node-version: 22
node-version-file: .nvmrc
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: 🛠️ Install
Expand All @@ -26,16 +31,19 @@ jobs:
- name: 📦 Build
run: yarn build

- name: 🧹 Run lint
run: yarn lint

- name: 🧪 Run tests
run: yarn test --coverage --run

- name: ⬆️ Upload coverage reports
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true
verbose: false
dry_run: false
# - name: ⬆️ Upload coverage reports
# uses: codecov/codecov-action@v6
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# fail_ci_if_error: true
# verbose: false
# dry_run: false

- name: 🚀 Publish NPM
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
Expand All @@ -58,7 +66,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
uses: actions/setup-node@v6
with:
node-version: 22
node-version-file: .nvmrc
registry-url: https://npm.pkg.github.com/
scope: '@celtian'

Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: 🐛 Test feature branch
'on': pull_request

permissions:
contents: read
pull-requests: write

jobs:
install-and-test:
name: 🛠️ Install & Test
Expand All @@ -13,7 +17,8 @@ jobs:
- name: 🗜️ Setup node version
uses: actions/setup-node@v6
with:
node-version: 22
node-version-file: .nvmrc
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: 🛠️ Install
Expand All @@ -22,6 +27,9 @@ jobs:
- name: 📦 Build
run: yarn build

- name: 🧹 Run lint
run: yarn lint

- name: 🧪 Run tests
run: yarn test --coverage --run

Expand All @@ -33,10 +41,10 @@ jobs:
json-summary-path: ./coverage/coverage-summary.json
json-final-path: ./coverage/coverage-final.json

- name: ⬆️ Upload coverage reports
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true
verbose: true
dry_run: true
# - name: ⬆️ Upload coverage reports
# uses: codecov/codecov-action@v6
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# fail_ci_if_error: true
# verbose: true
# dry_run: true
5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit
npx --no-install commitlint --edit "$1"
7 changes: 2 additions & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged

npx --no-install lint-staged --relative
npm test
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,cjs,mjs,ts}": ["eslint --fix", "prettier --write"],
"*.{json,md,yml,yaml}": "prettier --write"
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
24
Loading