Skip to content

Support React 18

Support React 18 #2

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Run Tests
on: [push, pull_request]
jobs:
tests:
runs-on: macos-latest
defaults:
run:
working-directory: .
strategy:
matrix:
node-version: ["16.x"]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
# Skip post-install scripts here, as a malicious
# script could steal the NPM_TOKEN.
- run: npm ci --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# `npm rebuild` will run all those post-install scripts for us.
- run: npm rebuild
- run: |
npm i \
react@^17.0.2 \
react-dom@^17.0.2 \
@testing-library/react@^12.1.3 \
@testing-library/react-hooks@^8.0.0
npm run build
- run: npm test
env:
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}