Skip to content

Commit

Permalink
Merge pull request #5 from PayU/char-mathcers
Browse files Browse the repository at this point in the history
feat: char mathcers
  • Loading branch information
ilan-kushnir-payu-gpo authored Nov 24, 2024
2 parents 4159226 + 7b72747 commit 5554935
Show file tree
Hide file tree
Showing 16 changed files with 6,003 additions and 66 deletions.
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

0 comments on commit 5554935

Please sign in to comment.