Skip to content

Add new GitHub Actions pipeline for frontend #1

Add new GitHub Actions pipeline for frontend

Add new GitHub Actions pipeline for frontend #1

Workflow file for this run

name: frontend-ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract versions from pom.xml
id: extract_versions
run: |
NODE_VERSION=$(xmllint --xpath 'string(//properties/node.version)' pom.xml)
NPM_VERSION=$(xmllint --xpath 'string(//properties/npm.version)' pom.xml)
echo "NODE_VERSION=$NODE_VERSION" >> "$GITHUB_ENV"
echo "NPM_VERSION=$NPM_VERSION" >> "$GITHUB_ENV"
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'npm'
- run: npm install --global 'npm@${{ env.NPM_VERSION }}'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test