Bump jest-environment-jsdom from 28.1.3 to 29.7.0 #117
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: CI | |
on: | |
- push | |
jobs: | |
test: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache dependencies | |
id: cache-dependencies | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }} | |
path: | | |
node_modules | |
~/.npm | |
- name: Install dependencies | |
if: ${{ steps.cache-dependencies.outputs.cache-hit == false }} | |
run: npm i --legacy-peer-deps | |
- name: Run tests | |
run: npm test | |
env: | |
REACT_APP_API_KEY_ACCUWEATHER: ${{ secrets.REACT_APP_API_KEY_ACCUWEATHER }} | |
REACT_APP_API_KEY_HERE: ${{ secrets.REACT_APP_API_KEY_HERE }} | |
REACT_APP_API_KEY_OPENWEATHERMAP: ${{ secrets.REACT_APP_API_KEY_OPENWEATHERMAP }} | |
REACT_APP_API_KEY_UNSPLASH: ${{ secrets.REACT_APP_API_KEY_UNSPLASH }} | |
- name: Save coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: coverage/ | |
scan: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Restore coverage report | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage | |
path: coverage/ | |
- name: Run SonarCloud scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |