Skip to content

Commit

Permalink
chore: introduce ci checks and static analysis (#4)
Browse files Browse the repository at this point in the history
* Introduce ci checks

* Fix test case with hardcoded path
  • Loading branch information
blyedev authored Nov 30, 2024
1 parent c6a4d97 commit 87bb212
Show file tree
Hide file tree
Showing 7 changed files with 1,818 additions and 112 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI Lint and Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, 20]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install Dependencies
run: npm ci

- run: npx prettier --check .
- run: npm run lint:ci
- run: npm run type-check
- run: npm test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/fixtures/
9 changes: 7 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import js from "@eslint/js";
import jsdoc from "eslint-plugin-jsdoc";
import importPlugin from "eslint-plugin-import";

/** @type {import('eslint').Linter.Config[]} */
export default [
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
js.configs.recommended,
jsdoc.configs["flat/recommended"],
importPlugin.flatConfigs.recommended,
{
files: ["**/*.js"],
languageOptions: {
ecmaVersion: 2020,
},
plugins: {
jsdoc,
},
Expand Down
Loading

0 comments on commit 87bb212

Please sign in to comment.