Some checks failed
Auto Tag on Merge to Main / auto-tag (push) Successful in 3s
CI - Lint and Build / lint-backend (push) Successful in 18s
CI - Lint and Build / lint-frontend (push) Successful in 15s
CI - Lint and Build / build-frontend (push) Successful in 14s
CI - Lint and Build / docker-build-test (push) Successful in 1m38s
Release - Build and Publish Docker Images / build-and-publish (push) Failing after 21s
Use npm install instead of npm ci since package-lock.json files are not committed to the repository. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
111 lines
2.3 KiB
YAML
111 lines
2.3 KiB
YAML
name: CI - Lint and Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint-backend:
|
|
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 backend dependencies
|
|
run: |
|
|
cd backend
|
|
npm install
|
|
|
|
- name: Run ESLint (backend)
|
|
run: |
|
|
cd backend
|
|
npm run lint || true
|
|
|
|
- name: Check formatting with Prettier
|
|
run: |
|
|
cd backend
|
|
npx prettier --check "src/**/*.js" || true
|
|
|
|
lint-frontend:
|
|
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 frontend dependencies
|
|
run: |
|
|
cd frontend
|
|
npm install
|
|
|
|
- name: Run ESLint (frontend)
|
|
run: |
|
|
cd frontend
|
|
npm run lint || true
|
|
|
|
build-frontend:
|
|
runs-on: ubuntu-latest
|
|
needs: lint-frontend
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install frontend dependencies
|
|
run: |
|
|
cd frontend
|
|
npm install
|
|
|
|
- name: Build frontend
|
|
run: |
|
|
cd frontend
|
|
npm run build
|
|
env:
|
|
VITE_API_URL: http://localhost/api
|
|
VITE_WS_URL: http://localhost
|
|
|
|
docker-build-test:
|
|
runs-on: ubuntu-latest
|
|
needs: [lint-backend, lint-frontend]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build backend image (test)
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./backend
|
|
push: false
|
|
tags: trenes-backend:test
|
|
|
|
- name: Build frontend image (test)
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./frontend
|
|
push: false
|
|
build-args: |
|
|
VITE_API_URL=http://localhost/api
|
|
VITE_WS_URL=http://localhost
|
|
tags: trenes-frontend:test
|