-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (62 loc) · 1.64 KB
/
ci.yml
File metadata and controls
68 lines (62 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# ==============================================================================
# CI Pipeline - Learnix
# Runs on: Pull requests and pushes to main
# Uses reusable workflows for DRY pattern
# ==============================================================================
name: CI
on:
push:
branches: [main]
paths:
- 'frontend/**'
- 'backend/**'
- '.github/workflows/ci.yml'
- '.github/workflows/reusable-ci.yml'
- '.github/actions/**'
pull_request:
branches: [main]
paths:
- 'frontend/**'
- 'backend/**'
- '.github/workflows/ci.yml'
- '.github/workflows/reusable-ci.yml'
- '.github/actions/**'
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# ==========================
# Backend CI
# ==========================
backend:
name: Backend
uses: ./.github/workflows/reusable-ci.yml
with:
project: backend
test-command: pnpm test
# ==========================
# Frontend CI
# ==========================
frontend:
name: Frontend
uses: ./.github/workflows/reusable-ci.yml
with:
project: frontend
test-command: pnpm test
# ==========================
# CI Status Check
# ==========================
ci-status:
name: CI Status
runs-on: ubuntu-latest
needs: [backend, frontend]
if: always()
steps:
- name: Check CI status
run: |
if [[ "${{ needs.backend.result }}" == "failure" ]] || \
[[ "${{ needs.frontend.result }}" == "failure" ]]; then
echo "❌ CI failed"
exit 1
fi
echo "✅ All CI checks passed"