Bump ejs from 3.1.7 to 3.1.10 in /ui #2109
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: Unit Testing | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
api: | |
name: API Testing | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Setup Node β | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Install π§ | |
run: cd api; npm ci | |
- name: Lint π | |
run: cd api; npm run lint | |
- name: Upload Lint Sarif π | |
if: always() | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: api/api-results.sarif | |
category: api | |
- name: Unit Test π€ | |
run: cd api; npm run test | |
- name: Upload Coverage π | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: api-coverage | |
path: api/coverage/lcov.info | |
ui: | |
name: UI Testing | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Setup env file β | |
run: | | |
echo "REACT_APP_GEOAPIFY_API_KEY=${{ secrets.GEOAPIFY_API_KEY }}" > ui/.env | |
echo "REACT_APP_WS_PROTOCOL=wss" >> ui/.env | |
echo "REACT_APP_DOMAIN=localhost" >> ui/.env | |
echo "REACT_APP_WS_PORT=3001" >> ui/.env | |
- name: Setup Node β | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Install π§ | |
run: cd ui; npm ci | |
- name: Lint π | |
run: cd ui; npm run lint | |
- name: Upload Lint Sarif π | |
if: always() | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ui/ui-results.sarif | |
category: ui | |
- name: Unit Test π€ | |
run: cd ui; npm run test | |
- name: Upload Coverage π | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ui-coverage | |
path: ui/coverage/lcov.info | |
sonar: | |
name: SonarCloud | |
needs: [api, ui] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Get API Coverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-coverage | |
path: api/ | |
- name: Get UI Coverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: ui-coverage | |
path: ui/ | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |