Skip to content

added npm install step to new workflow #3

added npm install step to new workflow

added npm install step to new workflow #3

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:
new-run-tests:
runs-on: macos-latest
defaults:
run:
working-directory: .
strategy:
matrix:
node-version: ["18.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 install
- 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 }}