Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update e2e test #3803

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 28 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: ".tool-versions"
- uses: extractions/setup-just@v2
- uses: actions/setup-go@v5
with:
go-version-file: "backend/go.mod"
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down Expand Up @@ -79,22 +83,33 @@ jobs:
- name: Run Tests
working-directory: frontend
run: npm run test
- name: Migrate database
run: |
go install github.com/amacneil/dbmate@latest
just migrate
working-directory: backend
env:
DB_TYPE: sqlite
DATABASE_URL: sqlite3:textusm.db
- name: Setup E2E
run: npm run test:e2e:init
working-directory: frontend
- name: Run E2E Tests
run: npm run test:e2e
working-directory: frontend
env:
API_ROOT: ${{ secrets.API_ROOT }}
WEB_ROOT: ${{ secrets.WEB_ROOT }}
API_ROOT: http://localhost:8081
WEB_ROOT: http://localhost:3000
APP_VERSION: ""
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }}
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
FIREBASE_AUTH_EMULATOR_HOST: ""
FIREBASE_API_KEY: textusm
FIREBASE_AUTH_DOMAIN: textusm
FIRESTORE_EMULATOR_HOST: "localhost:8082"
FIREBASE_PROJECT_ID: textusm
FIREBASE_STORAGE_BUKET: textusm.appspot.com
FIREBASE_STORAGE_EMULATOR_HOST: "localhost:9199"
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099"
FIREBASE_APP_ID: dev
STORAGE_BUCKET_NAME: textusm.appspot.com
SENTRY_ENABLE: "0"
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_RELEASE: ${{ steps.package-version.outputs.current-version}}
Expand All @@ -104,6 +119,11 @@ jobs:
MONITOR_ENABLE: "0"
USE_HTTPS: "0"
REPO_BUTTON_URL: ""
API_VERSION: v0.14.8
PORT: 8081
GO_ENV: development
DATABASE_URL: textusm.db
DB_TYPE: sqlite

backend-test:
name: backend_test
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ certs/*
backend/tmp/
data
firebase-export-*

*.sqlite3
*.db
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodejs 22.2.0
nodejs 20.18.0
golang 1.23.0
elm 0.19.1
just 1.36.0
28 changes: 14 additions & 14 deletions backend/db/postgresql/migrations/20241012091142_create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,27 @@ CREATE TABLE
settings (
id bigserial PRIMARY KEY,
uid varchar NOT NULL,
activity_color varchar,
activity_background_color varchar,
background_color varchar,
activity_color varchar NOT NULL,
activity_background_color varchar NOT NULL,
background_color varchar NOT NULL,
diagram diagram NOT NULL,
height int,
font varchar,
line_color varchar,
label_color varchar,
height int NOT NULL,
font varchar NOT NULL,
line_color varchar NOT NULL,
label_color varchar NOT NULL,
lock_editing boolean,
text_color varchar,
toolbar boolean,
scale real,
show_grid boolean,
story_color varchar,
story_background_color varchar,
task_color varchar,
task_background_color varchar,
width int,
story_color varchar NOT NULL,
story_background_color varchar NOT NULL,
task_color varchar NOT NULL,
task_background_color varchar NOT NULL,
width int NOT NULL,
zoom_control boolean,
created_at timestamp DEFAULT NOW(),
updated_at timestamp DEFAULT NOW()
created_at timestamp DEFAULT NOW() NOT NULL,
updated_at timestamp DEFAULT NOW() NOT NULL
);

CREATE UNIQUE INDEX items_uid_location_diagram_id_idx ON items (uid, location, diagram_id);
Expand Down
2 changes: 1 addition & 1 deletion backend/db/postgresql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ SET
width = $16,
zoom_control = $17
WHERE
diagram = $2;
diagram = $18;
Loading
Loading