Skip to content

WebApp CI

WebApp CI #1

Workflow file for this run

name: Webapp CI
on:
push:
branches:
- development
paths:
- 'src/webapp/**'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --prefix src/webapp
- name: Run linter
run: |
export PATH=$(pwd)/src/webapp/node_modules/.bin:$PATH
npm run lint --prefix src/webapp
build:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: npm install, build, and test
working-directory: ./src/webapp
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Zip artifact for deployment
working-directory: ./src/webapp
run: |
cd build
zip -r ../release.zip ./*
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: ./src/webapp/release.zip