This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
Merge pull request #1040 from SE-TINF22B6/dependabot/npm_and_yarn/src… #2026
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: React CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: './src/main/web/' | |
strategy: | |
matrix: | |
node-version: [ 18.x ] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Set CI to false | |
run: echo "CI=false" >> $GITHUB_ENV | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build React App | |
run: npm run build --if-present | |
- name: Test React App | |
run: npm test | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dhbw-hub-frontend | |
path: ./src/main/web/build/ |