Skip to content

Commit

Permalink
remove tests process on pipeline (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydykovkanat authored Jan 10, 2025
1 parent d8366b3 commit 408b1de
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 58 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,62 +34,62 @@ jobs:
npm ci
working-directory: frontend

- name: Install tests dependencies
run: |
echo "### Installing test dependencies... ###"
npm ci
working-directory: tests

- name: Seed test database
run: |
echo "### Start seed test database... ###"
npm run seed:test
working-directory: backend

- name: Start backend tests with pm2
run: |
echo "### Starting backend tests with pm2... ###"
pm2 start 0
working-directory: backend

- name: Wait for backend to be ready
run: |
echo "### Waiting for backend to be ready... ###"
while ! nc -z localhost 8010; do
echo "Backend is not ready yet. Retrying in 5 seconds..."
sleep 5
done
- name: Build frontend for tests
run: |
echo "### Build test frontend"
npm run build:test
working-directory: frontend

- name: Start frontend tests with pm2
run: |
echo "### Starting frontend tests with pm2... ###"
pm2 start 1
working-directory: frontend

- name: Wait for frontend to be ready
run: |
echo "### Waiting for frontend to be ready... ###"
while ! nc -z localhost 5183; do
echo "Frontend is not ready yet. Retrying in 5 seconds..."
sleep 5
done
- name: Run tests
run: |
echo "### Start tests... ###"
npx codeceptjs run --steps || true
working-directory: tests

- name: Stop test processes
run: |
echo "### Stop test pm2 process... ###"
pm2 stop 0 1
#- name: Install tests dependencies
# run: |
# echo "### Installing test dependencies... ###"
# npm ci
# working-directory: tests

#- name: Seed test database
# run: |
# echo "### Start seed test database... ###"
# npm run seed:test
# working-directory: backend

#- name: Start backend tests with pm2
# run: |
# echo "### Starting backend tests with pm2... ###"
# pm2 start 0
# working-directory: backend

#- name: Wait for backend to be ready
# run: |
# echo "### Waiting for backend to be ready... ###"
# while ! nc -z localhost 8010; do
# echo "Backend is not ready yet. Retrying in 5 seconds..."
# sleep 5
# done

#- name: Build frontend for tests
# run: |
# echo "### Build test frontend"
# npm run build:test
# working-directory: frontend

#- name: Start frontend tests with pm2
# run: |
# echo "### Starting frontend tests with pm2... ###"
# pm2 start 1
# working-directory: frontend

#- name: Wait for frontend to be ready
# run: |
# echo "### Waiting for frontend to be ready... ###"
# while ! nc -z localhost 5183; do
# echo "Frontend is not ready yet. Retrying in 5 seconds..."
# sleep 5
# done

#- name: Run tests
# run: |
# echo "### Start tests... ###"
# npx codeceptjs run --steps || true
# working-directory: tests

#- name: Stop test processes
# run: |
# echo "### Stop test pm2 process... ###"
# pm2 stop 0 1

- name: Restart backend and frontend
run: |
Expand Down
7 changes: 5 additions & 2 deletions backend/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ const rootPath = __dirname;
const corsWhitelist = [
'http://localhost:3000',
'http://localhost:5183',
'http://178.62.238.165:3000',
'http://178.62.238.165:5183',
'http://209.145.52.153:3000',
'http://209.145.52.153:5183',
'https://tennis.kg',
'https://tennis.kg:3000',
'https://tennis.kg:5183',
];

const corsOptions: CorsOptions = {
Expand Down

0 comments on commit 408b1de

Please sign in to comment.