Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0250e08
Add comprehensive GitHub Actions CI/CD workflows for full-stack project
cursoragent Jul 8, 2025
cdc51a5
Simplify CI/CD workflows and documentation for client and server
cursoragent Jul 8, 2025
56a2799
Switch from npm to yarn for dependency management in CI workflows
cursoragent Jul 8, 2025
bc4645a
Enhance CI workflows with timeouts and web build checks
cursoragent Jul 8, 2025
d6408c8
Update client CI to use npm web script for build testing
cursoragent Jul 8, 2025
bf128ad
fix: add yarn.lock to pass CI
tempest2023 Jul 8, 2025
5e16315
remove: Main CI and CI_SETUP
tempest2023 Jul 8, 2025
d0a84ff
Merge from origin cursor/add-github-ci-for-client-and-server-ca95 int…
tempest2023 Jul 8, 2025
f4f6014
fix: update ci and add mysql version sql
tempest2023 Jul 8, 2025
cc57d87
fix: lint errors
tempest2023 Jul 8, 2025
82c5aee
fix: update server readme
tempest2023 Jul 8, 2025
31c3511
fix: update mysql password to run CI
tempest2023 Jul 8, 2025
7ba234f
fix: assign server yarn.lock to cache
tempest2023 Jul 8, 2025
13aaebb
fix: update node version to pass ci
tempest2023 Jul 8, 2025
933ebab
fix: lint errors
tempest2023 Jul 8, 2025
ad8dc6f
fix: update yarn lock
tempest2023 Jul 8, 2025
8e6d7a4
fix: remove base-v2
tempest2023 Jul 8, 2025
6dbe7b8
fix: update CI, wait mysql in server ci, and degrade node version in …
tempest2023 Jul 8, 2025
75cf5bd
fix: degrade mysql version
tempest2023 Jul 8, 2025
d1cf707
fix: change dockerfile, build mysql 5.7 from linux platform
tempest2023 Jul 8, 2025
6926154
update: README
tempest2023 Jul 8, 2025
35eb47a
fix: remove ios and android build in client ci, add eas and app json …
tempest2023 Jul 8, 2025
8a8a453
fix: server CI to import sql table
tempest2023 Jul 9, 2025
78f8916
fix: server ci to import sayhi.mysql.sql after waiting MySQL
tempest2023 Jul 9, 2025
b24843f
fix: do not run `npm run dev` in CI, it leads to infinite running. Ch…
tempest2023 Jul 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Client CI

on:
push:
branches:
- main
- master
paths:
- 'client/**'
pull_request:
branches:
- main
- master
paths:
- 'client/**'

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'yarn'
cache-dependency-path: client/yarn.lock

- name: Install dependencies
timeout-minutes: 10
run: |
cd client
yarn install

- name: Lint code
run: |
cd client
npm run lint

- name: Build Web App
timeout-minutes: 3
run: |
cd client
npm run build

# - name: Build iOS App
# timeout-minutes: 3
# run: |
# cd client
# npm run build:ios

# - name: Build Android App
# timeout-minutes: 3
# run: |
# cd client
# npm run build:android
73 changes: 73 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Server CI for Egg.js backend

name: Server CI

on:
push:
branches:
- main
- master
paths:
- 'server/**'
pull_request:
branches:
- main
- master
paths:
- 'server/**'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up MySQL
uses: mirromutth/mysql-action@v1.1
with:
host port: 3306
character set server: 'utf8mb4'
mysql version: '5.7'
mysql database: 'SayHi'
mysql root password: 'root'
mysql user: 'root'
mysql password: 'root'

- name: Start Redis
uses: supercharge/redis-github-action@1.8.0
with:
redis-version: '6'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
cache-dependency-path: server/yarn.lock

- name: Install dependencies
timeout-minutes: 10
run: |
cd server
yarn install

- name: Wait for MySQL
run: |
for i in {1..30}; do
nc -z 127.0.0.1 3306 && echo "MySQL is up" && exit 0
echo "Waiting for MySQL..."
sleep 2
done
echo "MySQL did not start in time" && exit 1

- name: Import DB Schema
run: |
mysql -h 127.0.0.1 -u root -proot SayHi < sayhi.mysql.sql

- name: Run CI (lint + coverage)
run: |
cd server
npm run ci

6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM --platform=linux/amd64 mysql:5.7

ENV MYSQL_ROOT_PASSWORD=root
ENV MYSQL_DATABASE=SayHi

COPY sayhi.mysql.sql /docker-entrypoint-initdb.d/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ API Document: [Postman Workspaces SayHi](https://documenter.getpostman.com/view/

PostgreSQL@15 + Redis or MySQL + Redis

database backup: `./sayhi.sql`
database backup: `./sayhi.mysql.sql`, `./sayhi.postgre.sql`

## Demo & Video

Expand Down
5 changes: 5 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Require: Android Simulator
## Run Web Version
`yarn web`

If you meet errors because your node version is not 16, you can add env variable like this:
```
NODE_OPTIONS=--openssl-legacy-provider yarn web
```


## Components Library
[react-native-paper](https://callstack.github.io/react-native-paper/getting-started.html)
Expand Down
11 changes: 9 additions & 2 deletions client/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"**/*"
],
"ios": {
"supportsTablet": true
"supportsTablet": true,
"bundleIdentifier": "com.tar118.sayhi",
"icon": "./assets/logo.png"
},
"android": {
"adaptiveIcon": {
Expand All @@ -28,7 +30,12 @@
}
},
"web": {
"favicon": "./assets/favicon.ico"
"favicon": "./assets/logo.png"
},
"extra": {
"eas": {
"projectId": "97c8875c-17b5-4e83-8ee6-0bcd4b1b8ba1"
}
}
}
}
18 changes: 18 additions & 0 deletions client/eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"cli": {
"version": ">= 2.8.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
Loading
Loading