Skip to content

Commit 3ebf7ca

Browse files
authored
Merge pull request #313 from Code102SoftwareProject/dev
Dev
2 parents 69f4bf6 + 68600d8 commit 3ebf7ca

95 files changed

Lines changed: 9923 additions & 7983 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/badge-assignment.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: CI - Build and Test
2+
3+
on:
4+
# Trigger on pull requests to main branch
5+
pull_request:
6+
branches: [ main, master ]
7+
8+
# Trigger on pushes to main branch (merges)
9+
push:
10+
branches: [ main, master ]
11+
12+
# Allow manual trigger
13+
workflow_dispatch:
14+
15+
jobs:
16+
build-and-test:
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
node-version: [18.x, 20.x]
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'npm'
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Run tests
37+
run: npm test
38+
continue-on-error: false
39+
env:
40+
CI: true
41+
42+
- name: Build application
43+
run: npm run build
44+
continue-on-error: false
45+
env:
46+
CI: true
47+
48+
- name: Check build output
49+
run: |
50+
if [ ! -d ".next" ]; then
51+
echo "Build failed - .next directory not found"
52+
exit 1
53+
fi
54+
echo "Build successful - .next directory exists"
55+
56+
- name: Upload build artifacts (on failure)
57+
if: failure()
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: build-logs-${{ matrix.node-version }}
61+
path: |
62+
.next/
63+
npm-debug.log*
64+
yarn-debug.log*
65+
yarn-error.log*
66+
retention-days: 5
67+
68+
# Additional job for documentation build (if needed)
69+
build-docs:
70+
runs-on: ubuntu-latest
71+
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
72+
73+
steps:
74+
- name: Checkout code
75+
uses: actions/checkout@v4
76+
77+
- name: Setup Node.js
78+
uses: actions/setup-node@v4
79+
with:
80+
node-version: '20.x'
81+
cache: 'npm'
82+
83+
- name: Install main dependencies
84+
run: npm ci
85+
86+
- name: Install documentation dependencies
87+
run: |
88+
cd documentation
89+
npm ci
90+
91+
- name: Build documentation
92+
run: |
93+
cd documentation
94+
npm run build
95+
continue-on-error: false
96+
97+
# Security and quality checks
98+
security-audit:
99+
runs-on: ubuntu-latest
100+
101+
steps:
102+
- name: Checkout code
103+
uses: actions/checkout@v4
104+
105+
- name: Setup Node.js
106+
uses: actions/setup-node@v4
107+
with:
108+
node-version: '20.x'
109+
cache: 'npm'
110+
111+
- name: Install dependencies
112+
run: npm ci
113+
114+
- name: Run security audit
115+
run: npm audit --audit-level=high
116+
continue-on-error: true
117+
118+
- name: Check for outdated packages
119+
run: npm outdated || true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PR Quality Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
issues: write
11+
12+
jobs:
13+
quick-check:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.x'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build check
30+
run: npm run build
31+
env:
32+
CI: true

0 commit comments

Comments
 (0)