From 3a8561d1f83751409526c2300f045d4e3569d6d6 Mon Sep 17 00:00:00 2001 From: Clint Zirker Date: Tue, 3 Mar 2026 18:09:30 -0700 Subject: [PATCH] ci: add GitHub Actions CI workflow with mocha and eslint Adds CI that runs on push to master and pull requests: - mocha (blocking) for unit tests - eslint (non-blocking, advisory only) Also adds lint script to package.json. Task: ES-2706 Made-with: Cursor --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ src/package.json | 4 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e3bec4b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: src + strategy: + matrix: + node-version: [18] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + continue-on-error: true + + - name: Test + run: npm test diff --git a/src/package.json b/src/package.json index 4dc6176..56be352 100644 --- a/src/package.json +++ b/src/package.json @@ -7,7 +7,9 @@ "example": "examples" }, "scripts": { - "test": "mocha 'test/**/*.test.js'" + "test": "mocha 'test/**/*.test.js'", + "lint": "eslint .", + "lint": "eslint ." }, "repository": { "type": "git",