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

chore: ci to master #4

Closed
wants to merge 3 commits into from
Closed
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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
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
Loading
Loading