File tree Expand file tree Collapse file tree 2 files changed +84
-0
lines changed
Expand file tree Collapse file tree 2 files changed +84
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Backend CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build-and-test :
11+ runs-on : ubuntu-latest
12+
13+ defaults :
14+ run :
15+ working-directory : backend
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Python 3.10
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ' 3.10'
24+
25+ - name : Install dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ pip install flake8 pytest pytest-cov
29+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
31+ - name : Lint with flake8
32+ run : |
33+ # stop the build if there are Python syntax errors or undefined names
34+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
38+ - name : Compile C++ Genetic Algorithm core
39+ run : |
40+ g++ -std=c++17 -O3 -o Algo1 Algo.cpp
41+
42+ - name : Test with pytest
43+ run : |
44+ pytest
Original file line number Diff line number Diff line change 1+ name : Frontend CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build-and-test :
11+ runs-on : ubuntu-latest
12+
13+ defaults :
14+ run :
15+ working-directory : frontend
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Node.js 18.x
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : ' 18.x'
24+ cache : ' npm'
25+ cache-dependency-path : frontend/package-lock.json
26+
27+ - name : Install dependencies
28+ run : npm ci
29+
30+ - name : Run lint
31+ run : npm run build -- --dry-run
32+ continue-on-error : true
33+
34+ - name : Run tests
35+ run : npm test -- --watchAll=false
36+
37+ - name : Build production bundle
38+ run : npm run build
39+ env :
40+ CI : true
You can’t perform that action at this time.
0 commit comments