Skip to content

Commit

Permalink
add new react17 github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jesuyedavid committed Feb 14, 2024
1 parent 390534e commit c296f47
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/new-run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 }}

0 comments on commit c296f47

Please sign in to comment.