923 add support for categories for software #605
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
# SPDX-FileCopyrightText: 2022 - 2023 Dusan Mijatovic (dv4all) | |
# SPDX-FileCopyrightText: 2022 - 2023 dv4all | |
# SPDX-FileCopyrightText: 2023 Dusan Mijatovic (Netherlands eScience Center) | |
# SPDX-FileCopyrightText: 2023 Ewan Cahen (Netherlands eScience Center) <[email protected]> | |
# SPDX-FileCopyrightText: 2023 Netherlands eScience Center | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: frontend tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "frontend/**" | |
pull_request: | |
paths: | |
- "frontend/**" | |
jobs: | |
fe-tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: "install node v18.5 and cash yarn" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.5 | |
cache: 'yarn' | |
cache-dependency-path: frontend/yarn.lock | |
- name: "install dependencies" | |
working-directory: frontend | |
run: yarn install --frozen-lockfile | |
- name: "run eslint check" | |
working-directory: frontend | |
run: yarn lint | |
- name: "run unit test" | |
working-directory: frontend | |
run: yarn test:coverage | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: SonarCloud Scan frontend | |
uses: sonarsource/sonarcloud-github-action@master | |
with: | |
projectBaseDir: frontend | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: "run build test" | |
working-directory: frontend | |
run: yarn build |