Skip to content

Commit

Permalink
chore: Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Aug 10, 2024
1 parent 8743493 commit 333898d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests

on:
push:
branches: [master]
pull_request:
branches: ['**']

jobs:
test:
name: Node v${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
cache: 'npm'
- name: Install packages for project
run: npm ci
- name: Run tests
run: |
cd test
npm start
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/CONTRIBUTING.md
/CONTRIBUTING.md
/test
17 changes: 17 additions & 0 deletions test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "test",
"private": true,
"workspaces": [
"../"
],
"scripts": {
"start": "npm i @diplodoc/lint && npx @diplodoc/lint init",
"lint": "lint init && lint",
"lint:fix": "lint init && lint --fix",
"pre-commit": "lint init && lint-staged",
"prepare": "husky"
},
"dependencies": {
"@diplodoc/lint": "^1.0.0"
}
}

0 comments on commit 333898d

Please sign in to comment.