Skip to content

Commit

Permalink
Update CI workflow and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
absternator committed Mar 1, 2024
1 parent 798341b commit 27abd25
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/jestCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ jobs:
run: |
pwd
cp ./src/resources/config.json.in.development ./src/resources/config.json
- name: Run all components
- name: run dependencies
working-directory: .
run: ./scripts/run_test
run: ./scripts/run_dependencies
- name: Run server
working-directory: .
run: ./scripts/run_server
- name: Run unit and integration tests
run: npm run test
- name: Stop all components
- name: stop dependencies
working-directory: .
run: ./scripts/stop_test
run: ./scripts/stop_dependencies
2 changes: 1 addition & 1 deletion app/client-v2/e2e/vue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { test, expect } from "@playwright/test";
// See here how to get started:
// https://playwright.dev/docs/intro
test("first test", async ({ page }) => {
await page.goto("http://localhost:5173/login");
await page.goto("/login");

await expect(page.getByText("Welcome to Beebop")).toBeVisible();
});
2 changes: 1 addition & 1 deletion app/client-v2/src/stores/userStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const useUserStore = defineStore("user", {
// todo: proper error handling
async getUser() {
try {
const res = await fetch(`${getApiUrl()}/user`, {
const res = await fetch(`${getApiUrl()}/user`, {
credentials: "include"
});
const data: UserResponse = await res.json();
Expand Down
2 changes: 1 addition & 1 deletion app/server/src/resources/config.json.in.development
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"server_port": 4000,
"api_url": "http://localhost:5000",
"client_url": "http://localhost:8080",
"client_url": "http://localhost:5173",
"server_url": "http://localhost:4000",
"redis_url": "redis://localhost:6379",
"GOOGLE_CLIENT_ID": "${GOOGLE_ID}",
Expand Down
7 changes: 7 additions & 0 deletions scripts/stop_dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -e

NAME_REDIS=beebop-redis
NAME_API=beebop-py-api
NAME_WORKER=beebop-py-worker

docker stop $NAME_REDIS $NAME_WORKER $NAME_API
6 changes: 2 additions & 4 deletions scripts/stop_test
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
set -e

NAME_REDIS=beebop-redis
NAME_API=beebop-py-api
NAME_WORKER=beebop-py-worker
HERE=$(realpath "$(dirname $0)")
. $HERE/stop_dependencies

docker stop $NAME_REDIS $NAME_WORKER $NAME_API
node ./node_modules/pm2/bin/pm2 delete beebop_client
node ./node_modules/pm2/bin/pm2 delete beebop_server

0 comments on commit 27abd25

Please sign in to comment.