From e0ffd98d042dbdf9d712a35507876f376ce8821a Mon Sep 17 00:00:00 2001 From: Mikkel Malmberg Date: Mon, 5 Jan 2026 15:25:45 +0100 Subject: [PATCH] Add linter and update CI --- .github/workflows/integrate.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/test-node.yml | 24 ------------------------ package.json | 2 +- 3 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/integrate.yml delete mode 100644 .github/workflows/test-node.yml diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml new file mode 100644 index 0000000..4a0e940 --- /dev/null +++ b/.github/workflows/integrate.yml @@ -0,0 +1,28 @@ +name: Integrate +on: + push: + branches: [main] + pull_request: + branches: [main] +jobs: + lint: + runs-on: ubuntu-latest + name: Lint + steps: + - uses: holepunchto/actions/node-base@v1 + - run: npm run lint + test: + strategy: + matrix: + include: + - os: ubuntu-latest + platform: linux + - os: macos-latest + platform: darwin + - os: windows-latest + platform: win32 + runs-on: ${{ matrix.os }} + name: Test / ${{ matrix.platform }} + steps: + - uses: holepunchto/actions/node-base@v1 + - run: npm test diff --git a/.github/workflows/test-node.yml b/.github/workflows/test-node.yml deleted file mode 100644 index b1f544c..0000000 --- a/.github/workflows/test-node.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build Status -on: - push: - branches: - - main - pull_request: - branches: - - main -jobs: - build: - strategy: - matrix: - node-version: [lts/*] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run lint - - run: npm test diff --git a/package.json b/package.json index 04abb13..9f03778 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "scripts": { "format": "prettier --write .", "lint": "prettier --check . && lunte", - "test": "npm run lint && brittle test/*.js", + "test": "brittle-node test/*.js", "generate": "rm -rf test/fixtures/generated && node test/fixtures/generate.js" }, "exports": {