Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: char mathcers #5

Merged
merged 22 commits into from
Nov 24, 2024
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
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:

jobs:
package-lock-lint:
name: package-lock lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 22
- name: lint package-lock
run: npx lockfile-lint --path package-lock.json --allowed-hosts npm --validate-https


test:
strategy:
matrix:
platform: [ubuntu-latest]
node: ['18', '20', '22']
needs: [package-lock-lint]
name: test (node V${{ matrix.node }})
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
- name: Run Tests & Collect Coverage
run: npm run test:coveralls
- name: Coveralls
uses: coverallsapp/github-action@master
if: matrix.node == '22'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on: [ workflow_dispatch ]

jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 22
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ npx lint-staged
echo "* Finished lint check"

# echo "* Validating no .only in tests"
# npm run test -- --dry-run
# npm run tests -- --dry-run
# echo "* Finished .only check"

echo "* Validating dependencies"
npx depcheck
echo "* Finished dependecies check"
echo "* Finished dependecies check"
1 change: 0 additions & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
forbidOnly: !!CI, // fail the pipeline whenever .only is committed to the tests
require: [
'ts-node/register', // required for running tests with TypeScript
'tests/utils/chaiPlugins.ts', // import chai plugins
],
recursive: true,
exit: true,
Expand Down
6 changes: 6 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"reporter": ["lcov", "text"],
"extension": [".ts"],
"include": ["src/**/*.ts"],
"exclude": ["tests/**/*.ts"]
}
Loading
Loading