diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24baf74..6b5f66f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,51 +17,66 @@ jobs: - name: Install Dependencies run: npm install - name: Test - run: npm run test-in-browsers + run: npm run test:browser + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install Dependencies + run: npm install --ignore-scripts + - name: Lint + run: npm run lint + test: runs-on: ubuntu-latest strategy: matrix: node-version: + - 6 + - 8 - 10 - 11 - 12 - 13 - 14 - - 15 - 16 + - 18 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Upgrade npm + if: ${{ success() && matrix.node-version == '6' }} + run: npm i npm@6.13.4 -g - name: Install Dependencies run: npm install --ignore-scripts - name: Test - run: npm test - test-legacy: + run: npm run test:unit + + typescript: runs-on: ubuntu-latest - strategy: - matrix: - node-version: - - 6 - - 8 steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: 18 - name: Install Dependencies run: npm install --ignore-scripts - - name: Test - run: npm run test-legacy + - name: tsd + run: npm run test:typescript + automerge: needs: + - lint - browsers - test - - test-legacy + - typescript runs-on: ubuntu-latest permissions: pull-requests: write diff --git a/package.json b/package.json index f4d0cfd..41936b3 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,11 @@ "types": "index.d.ts", "scripts": { "benchmark": "cd benchmarks && npm install && npm run all", - "test": "standard && tsd && nyc tape test.js", - "test-in-browsers": "airtap test.js", - "test-legacy": "nyc tape test.js" + "lint": "standard", + "test": "nyc tape test.js", + "test:unit": "tape test.js", + "test:typescript": "tsd", + "test:browser": "airtap test.js" }, "repository": { "type": "git",