Skip to content

Commit 7f28de1

Browse files
committed
Add tests
1 parent 7d3fb37 commit 7f28de1

File tree

10 files changed

+1236
-213
lines changed

10 files changed

+1236
-213
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/rust.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
backend:
13+
name: Backend Tests
14+
runs-on: ubuntu-latest
15+
env:
16+
RUSTFLAGS: "-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3"
17+
RUST_BACKTRACE: full
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Build
21+
run: cargo build --verbose
22+
- name: Run tests
23+
run: cargo test --verbose
24+
25+
frontend-e2e:
26+
name: Frontend E2E Tests
27+
runs-on: ubuntu-latest
28+
env:
29+
RUSTFLAGS: "-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3"
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: '20'
36+
cache: 'npm'
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Install Playwright browsers
40+
run: npx playwright install --with-deps chromium
41+
- name: Build frontend
42+
run: npm run build
43+
- name: Build backend
44+
run: cargo build
45+
- name: Run Playwright tests
46+
run: npm test
47+
env:
48+
CI: true
49+
- name: Upload test results
50+
if: always()
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: playwright-report
54+
path: playwright-report/
55+
retention-days: 7

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ node_modules/
66
public/scripts/bundle.js
77
npm-debug.log
88

9+
# playwright
10+
test-results/
11+
playwright-report/
12+
.playwright/
13+
914
# vim
1015
*.sw[a-z]
1116

@@ -17,5 +22,3 @@ public/fonts/*
1722

1823
# jetbrains
1924
.idea
20-
21-
config.test.yml

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ FROM docker.io/rust:1-alpine as build
33
WORKDIR /workspace
44

55
COPY js js
6-
COPY .babelrc .babelrc
76
COPY public public
87
COPY package*.json ./
98

0 commit comments

Comments
 (0)