Skip to content
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
32 changes: 32 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .github/workflows/ci.yml
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '23.2.0' # Update to Node.js version 16 or higher

- name: Install dependencies
run: npm install

- name: Run ESLint
run: npm run lint # Ensure you have a lint script in your package.json

- name: Run tests
run: npm test # Ensure you have a test script in your package.json
7 changes: 6 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import pluginJs from "@eslint/js";
/** @type {import('eslint').Linter.Config[]} */
export default [
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
{languageOptions: { globals: globals.browser }},
{languageOptions: {
globals: {
...globals.browser, // Keep existing browser globals
process: 'readonly', // Add 'process' as a global variable
},
}},
pluginJs.configs.recommended,
];
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"main": "app.js",
"scripts": {
"test": "jest",
"lint": "npx eslint models services routes",
"test:coverage": "jest --coverage --detectOpenHandles --forceExit",
"start": "nodemon server.js"
},
Expand Down
Loading