add shape and text #45
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: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
test: | |
timeout-minutes: 10 | |
name: Node v${{ matrix.node-version }} on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 21.x] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set git config | |
shell: bash | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
if: runner.os == 'Windows' | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Create the npm cache directory | |
run: mkdir npm-cache && npm config set cache ./npm-cache --global | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: ./npm-cache | |
key: v1-${{ runner.os }}-node-${{ matrix.node-version }}-npm-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
v1-${{ runner.os }}-node-${{ matrix.node-version }}-npm- | |
- run: npm install | |
- run: npm test | |
env: | |
CI: true | |
benchmark: | |
timeout-minutes: 15 | |
name: Measure performance impact of changes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 12.x | |
- name: Create the npm cache directory | |
run: mkdir npm-cache && npm config set cache ./npm-cache --global | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: ./npm-cache | |
key: v1-npm-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
v1-npm- | |
- run: npm install | |
- run: npm run benchmark | |
env: | |
CI: true | |
typescript: | |
timeout-minutes: 15 | |
name: Ensure typescript compatibility | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
- name: Create the npm cache directory | |
run: mkdir npm-cache && npm config set cache ./npm-cache --global | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: ./npm-cache | |
key: v1-npm-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
v1-npm- | |
- run: npm install | |
- run: npm install typescript | |
- run: tsc index.d.ts | |
env: | |
CI: true |