Clean Rebuild and Web CI Workflow Implementation (#27)
* Remove external tool dependencies and branding * Add package lock json * Add web CI workflow to validate web changes on PRs and commits
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
name: Web Project CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
paths:
|
||||
- 'web/**'
|
||||
- '.github/workflows/web-ci.yml'
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
paths:
|
||||
- 'web/**'
|
||||
- '.github/workflows/web-ci.yml'
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: './web/package-lock.json'
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./web
|
||||
run: |
|
||||
if [ -f "package-lock.json" ]; then
|
||||
npm ci
|
||||
else
|
||||
npm install
|
||||
fi
|
||||
|
||||
- name: Lint
|
||||
working-directory: ./web
|
||||
run: npm run lint || echo "Linting failed but continuing with the build"
|
||||
|
||||
- name: Type check
|
||||
working-directory: ./web
|
||||
run: npm run test:types || echo "Type checking failed but continuing with the build"
|
||||
|
||||
- name: Format check
|
||||
working-directory: ./web
|
||||
run: npm run format:check || echo "Format checking failed but continuing with the build"
|
||||
|
||||
- name: Build
|
||||
working-directory: ./web
|
||||
run: npm run build
|
||||
Reference in New Issue
Block a user