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
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Integrate
on:
push:
branches: [main]
tags:
- '*'
pull_request:
branches: [main]
jobs:
lint:
if: ${{ !startsWith(github.ref, 'refs/tags/')}}
runs-on: ubuntu-latest
name: Lint
steps:
- uses: holepunchto/actions/node-base@v1
- run: npm run lint
test:
if: ${{ !startsWith(github.ref, 'refs/tags/')}}
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/bare-base@v1
- run: npm test
trigger_canary:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: trigger canary
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.CANARY_DISPATCH_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/holepunchto/canary-tests/dispatches \
-d '{"event_type":"triggered-by-${{ github.event.repository.name }}-${{ github.ref_name }}"}'
40 changes: 0 additions & 40 deletions .github/workflows/test-node.yaml

This file was deleted.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
},
"scripts": {
"format": "prettier --write .",
"lint": "prettier --check .",
"test": "npm run lint && brittle test.js",
"test:bare": "bare test.js"
"lint": "prettier --check . && lunte",
"test": "npm run test:node && npm run test:bare",
"test:bare": "brittle-bare --coverage test.js",
"test:node": "brittle-node --coverage test.js"
},
"author": "Holepunch",
"license": "Apache-2.0",
Expand Down Expand Up @@ -47,6 +48,7 @@
"hypercore-crypto": "^3.4.0",
"hyperdht": "^6.6.0",
"hyperswarm": "^4.0.0",
"lunte": "^1.3.0",
"prettier": "^3.6.2",
"prettier-config-holepunch": "^2.0.0",
"test-tmp": "^1.3.0"
Expand Down