chore: use single export #128
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | |
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- node-version: 10.x | |
test-on-old-node: 1 | |
- node-version: 12.x | |
test-on-old-node: 1 | |
# test-on-brower: 1 | |
- node-version: 14.x | |
- node-version: 16.x | |
- node-version: 18.x | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node - ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install Dependencies On Old Node ${{ matrix.node-version }} | |
if: ${{ matrix.test-on-old-node == '1' }} | |
run: node ci/remove-deps-4-old-node.js && yarn install --ignore-scripts | |
- name: Install Dependencies On Node ${{ matrix.node-version }} | |
if: ${{ matrix.test-on-old-node != '1' }} | |
run: yarn install | |
- name: Build | |
run: npm run build | |
- name: Build On Old Node | |
if: ${{ matrix.test-on-old-node == '1' }} | |
run: npm run build:test | |
- name: Test On Node ${{ matrix.node-version }} | |
env: | |
BROWSER: ${{ matrix.test-on-brower }} | |
HTTP2_TEST_DISABLED: ${{ matrix.http2-test-disabled }} | |
OLD_NODE_TEST: ${{ matrix.test-on-old-node }} | |
run: | | |
if [ "$OLD_NODE_TEST" = "1" ]; then | |
make test | |
else | |
npm run lint | |
make test | |
fi | |
- name: Coverage On Node ${{ matrix.node-version }} | |
run: | |
npm run coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |