diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..38025b8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Test +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + test: + strategy: + matrix: + include: + - os: ubuntu-latest + platform: linux + arch: x64 + - os: macos-latest + platform: darwin + arch: arm64 + - os: windows-latest + platform: win32 + arch: x64 + runs-on: ${{ matrix.os }} + name: ${{ matrix.platform }}-${{ matrix.arch }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - run: npm install -g bare-runtime + - run: npm install + - run: npm test diff --git a/package.json b/package.json index 3cc6ec9..fd0c5fa 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,10 @@ } }, "scripts": { - "test": "standard && bare test.js" + "test": "npm run lint && npm run test:bare && npm run test:node", + "test:bare": "bare test.js", + "test:node": "node test.js", + "lint": "standard" }, "repository": { "type": "git",