Skip to content

Commit

Permalink
Separate CI steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Apr 8, 2022
1 parent 888dc69 commit fec14f4
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,43 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
- run: npm ci
- run: npm run lint
- run: npm run test:microtask
- run: npm run test:immediate
if: ${{ matrix.node-version != '10.x' }}
- run: npx c8 --reporter=lcov mocha
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: 16.x
- uses: actions/checkout@v2
- run: npm ci
- run: npm run lint

package:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: 16.x
- uses: actions/checkout@v2
- run: npm ci
- run: npm pack
- run: tar -xzf asynciterator-*.tgz
- name: Test package
if: ${{ matrix.node-version == '16.x' }}
run: |
- run: npx tsc package/dist/asynciterator.d.ts
- run: |
pushd package
node -e 'require(".")'
echo 'import { AsyncIterator } from "asynciterator"' > test.mjs;
node test.mjs;
popd
- run: npx tsc package/dist/asynciterator.d.ts
- run: npx c8 --reporter=lcov mocha
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true
coveralls:
needs: test
Expand Down Expand Up @@ -71,8 +87,10 @@ jobs:

gh-pages:
needs:
- docs
- lint
- test
- package
- docs
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down

0 comments on commit fec14f4

Please sign in to comment.