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

Add basic quality check workflow #25

Merged
Show file tree
Hide file tree
Changes from 3 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
28 changes: 28 additions & 0 deletions .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: quality-check
run-name: ${{ github.actor }} triggered a quality check
on: [push]
jobs:
quality-check:
name: run-check for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
# Use Node 20 LTS
node-version: 'lts/Iron'
# Install dependencies
- run: npm cache clean --force
- run: npm set registry https://registry.npmjs.org/
- run: npm ci
# Run tests
- run: npm run test
# Check formatting
- run: npm run formatting
# Run linter
- run: npm run lint
# Ensure code compiles
- run: npm run build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.log
.DS_Store
node_modules
dist
dist
coverage
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"scripts": {
"start": "ts-node index.ts",
"test": "jest",
"lint": "eslint --ext .ts . && prettier . --check",
"fix": "eslint --ext .ts . --fix && prettier . --write",
"formatting": "prettier . --check",
"lint": "eslint --ext .ts .",
"fix-lint": "eslint --ext .ts . --fix",
"fix-formatting": "prettier . --write",
"build": "tsc"
},
"repository": {
Expand Down