add swc libs to github workflow step #5
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
# 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 | |
- run: npm install --save-optional \ | |
"@swc/core-darwin-arm64" \ | |
"@swc/core-darwin-x64" \ | |
"@swc/core-linux-arm-gnueabihf" \ | |
"@swc/core-linux-arm64-gnu" \ | |
"@swc/core-linux-arm64-musl" \ | |
"@swc/core-linux-x64-gnu" \ | |
"@swc/core-linux-x64-musl" \ | |
"@swc/core-win32-arm64-msvc" \ | |
"@swc/core-win32-ia32-msvc" \ | |
"@swc/core-win32-x64-msvc" | |
- run: npm run build | |
- run: npm test | |
env: | |
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }} |