ethers.js/.github/workflows/test-ci.yml

84 lines
1.7 KiB
YAML
Raw Normal View History

2022-10-01 02:31:00 +03:00
name: Continuous Integration Tests
on:
push:
branches:
- v6-beta-exports
jobs:
test-node:
2022-10-01 03:05:00 +03:00
name: Run Tests
2022-10-01 02:31:00 +03:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 16.x, 18.x ]
2022-10-01 02:38:49 +03:00
test-type: [ esm, commonjs ]
2022-10-01 02:31:00 +03:00
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: "v6-beta-exports"
- name: Install dependencies
run: npm ci
- name: Build ESM and CommonJS (from TypeScript)
run: npm run build-all
- name: Run tests (${{ matrix.test-type }})
2022-10-01 02:38:49 +03:00
run: npm run test-${{ matrix.test-type }}
2022-10-01 02:31:00 +03:00
coverage:
2022-10-01 02:38:49 +03:00
name: Generate Coverage
2022-10-01 02:31:00 +03:00
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/setup-node@v1
with:
node-version: 18.x
2022-10-01 02:31:00 +03:00
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: "v6-beta-exports"
- name: Install dependencies
run: npm ci
- name: Build ESM (from TypeScript)
run: npm run build
- name: Run tests
run: npm run test-coverage
- name: Upload coverage summary
uses: actions/upload-artifact@v2
with:
name: coverage-summary
path: ./output/summary.txt
- name: Tar files
run: tar -cvf ./output/coverage.tar ./output/lcov-report/
- name: Upload coverage
uses: actions/upload-artifact@v2
with:
name: coverage-complete
path: ./output/coverage.tar