Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
ed9fa10
fix: instrument navbar style
yinanazhou Sep 19, 2025
20558a5
fix: add navigation support for google translate
yinanazhou Sep 23, 2025
3bfc769
Merge pull request #392 from DDMAL/nav-fix
yinanazhou Sep 25, 2025
d865125
Merge pull request #395 from DDMAL/gt-fix
yinanazhou Sep 25, 2025
5b2aa55
fix: move count num outside of hbs facet list for google translate
yinanazhou Sep 25, 2025
88457b3
Merge pull request #397 from DDMAL/hbs-trans
yinanazhou Oct 3, 2025
b2fc4f9
fix: change detail page title to instrument name
yinanazhou Oct 22, 2025
58a3b30
Merge pull request #401 from DDMAL/instrument-title
yinanazhou Oct 23, 2025
82900f6
Update adding instrument name to see if that already exists in UMIL_db
PouyaMohseni Oct 28, 2025
8f5b4b7
Revert "Update adding instrument name to see if that already exists i…
PouyaMohseni Oct 28, 2025
73f9021
Fix duplicate added names in update_umil_db.py
PouyaMohseni Oct 28, 2025
62936e9
test: set up vitest and add frontend unit test
yinanazhou Oct 1, 2025
0bc7203
test: init playwright configs & set up test dataset
yinanazhou Oct 14, 2025
dc30dfb
test: init playwright pages
yinanazhou Oct 16, 2025
7cbd74f
test: init playwright fixtures
yinanazhou Oct 16, 2025
67462a5
test: add separate docker compose config for E2E test
yinanazhou Oct 22, 2025
a05de14
test: add navigation E2E test for desktop and mobile
yinanazhou Oct 22, 2025
1ea3a06
ci: init workflow for E2E tests
yinanazhou Oct 22, 2025
d4cdd78
fix(update_umil_db.py): check for duplicate name in query and umil_db
PouyaMohseni Nov 6, 2025
ccbcd48
test: add E2E authentication tests for desktop and mobile
yinanazhou Nov 7, 2025
cfebcde
refactor: remove unnecessary async for `isMobile`
yinanazhou Nov 11, 2025
0bc9d36
fix: use class selector for language btns on home page
yinanazhou Nov 11, 2025
32dd4f6
test: init test for google translate automation on language btn
yinanazhou Nov 11, 2025
0462f60
fix: update auth setup and optimize auth test
yinanazhou Nov 11, 2025
ad17cc4
fix: update test mode environment variable for instrument import command
yinanazhou Nov 11, 2025
3922ba9
ci: add step to build frontend assets before E2E tests
yinanazhou Nov 11, 2025
e28d0c2
fix: add error handling to instrument import in E2E test
yinanazhou Nov 12, 2025
f75e80e
fix: add solr indexing & error handling
yinanazhou Nov 12, 2025
f9f20d6
fix(import_languages.py): add User-Agent header to prevent request bl…
PouyaMohseni Nov 13, 2025
aa3b6bf
fix(detail.html): add notranslate to alias fields
PouyaMohseni Nov 14, 2025
ade151c
Created spreadsheet directory for storing spreadsheet versions in zip…
kyrieb-ekat Nov 14, 2025
2687f26
Merge pull request #422 from DDMAL/spreadsheet
kyrieb-ekat Nov 14, 2025
98553bf
feat: add RTL support and ltr-keep override for Google Translate in scss
PouyaMohseni Nov 17, 2025
bdc6bc0
feat: force left-to-right for the French content
PouyaMohseni Nov 18, 2025
b699533
fix(detail.html): add notranslate to alias fields
PouyaMohseni Nov 18, 2025
06846f1
fix: update setCookie & add deleteCookie for safari
yinanazhou Nov 18, 2025
bdac44f
test: add checks for frSite & enSite cookie
yinanazhou Nov 18, 2025
9b68aee
test: update unit test for cookies
yinanazhou Nov 18, 2025
9845583
fix: add comments and changed ltr-keep to force-ltr
PouyaMohseni Nov 19, 2025
c72e94f
fix: added notranslate to UMIL name
PouyaMohseni Nov 19, 2025
f0cadc2
fix: enable baseURL inheritance in playwright setup project
yinanazhou Nov 19, 2025
65ea6d6
Fix: Check new name exists in UMIL_db
PouyaMohseni Nov 19, 2025
b52ea3b
fix: add notranslate to UMIL name
PouyaMohseni Nov 19, 2025
cc2a00b
fix: decode cookie in readCookie to match writeCookie
yinanazhou Nov 19, 2025
a890e96
Merge pull request #415 from DDMAL/vitest-init
yinanazhou Nov 26, 2025
5918295
chore: add auto-generated test results to gitignore
yinanazhou Nov 20, 2025
0caf30e
chore: add .cursor/ to gitignore
yinanazhou Nov 24, 2025
b5b14d5
feat(auth): add email verification for user registration
yinanazhou Nov 26, 2025
b76b934
test: add email verification to registration e2e tests
yinanazhou Nov 26, 2025
d28b0c3
chore: comment out email settings in .env.sample
yinanazhou Nov 26, 2025
42067e3
fix: remove email param in `extractVerificationUrl`
yinanazhou Nov 26, 2025
bebbc79
style: remove `View all languages` button
yinanazhou Nov 26, 2025
ac0c524
Merge branch 'develop' into fix/import-languages-header
PouyaMohseni Nov 27, 2025
eb456a8
fix(import_languages.py): add User-Agent header to prevent request bl…
PouyaMohseni Nov 27, 2025
fbbdc6f
Merge pull request #442 from DDMAL/remove-view-all
yinanazhou Nov 27, 2025
4fff599
fix: update translated-rtl and force-ltr to the nested version
PouyaMohseni Nov 27, 2025
aaa055a
refactor: extract email sending task from nested function
yinanazhou Nov 27, 2025
aef1e64
Merge pull request #439 from DDMAL/email-notif
yinanazhou Nov 27, 2025
1cad557
feat: add RTL language support to instrument detail page
PouyaMohseni Dec 1, 2025
aa48ad8
fix: rename direction to html_direction in the Language model and enh…
PouyaMohseni Dec 2, 2025
4a334dd
fix: removed the unused variable: fetched_dir
PouyaMohseni Dec 2, 2025
86650d5
Merge pull request #428 from DDMAL/rtl-googletranslate
PouyaMohseni Dec 2, 2025
b05019f
Merge pull request #445 from DDMAL/add-lang-align
PouyaMohseni Dec 2, 2025
d0d0353
fix: repair failing tests by correcting instruments migration chain
PouyaMohseni Dec 2, 2025
cea2f93
Merge pull request #447 from DDMAL/fix-migrations
PouyaMohseni Dec 3, 2025
d2329ac
fix: adjust table direction when translated to rtl
PouyaMohseni Dec 4, 2025
c5a29f4
fix: standardize instrument titles using original Wikidata capitaliza…
PouyaMohseni Nov 24, 2025
a08aef7
fix: make addName modal rtl-friendly
PouyaMohseni Dec 7, 2025
a6ed3f4
Merge pull request #438 from DDMAL/correct-capitalization
PouyaMohseni Dec 9, 2025
1eee976
fix: add space between colon for ID and InstrumentName
PouyaMohseni Dec 9, 2025
df56332
fix: use Bootstrap prebuilt features and align stack layout with wind…
PouyaMohseni Dec 4, 2025
3adc41a
Merge pull request #452 from DDMAL/rtl-fix-addname
PouyaMohseni Dec 10, 2025
3df22be
Merge pull request #449 from DDMAL/direction-support-inst-detail
PouyaMohseni Dec 10, 2025
d49e147
feat: add `force-rtl` utilities for forced-ltr contexts
PouyaMohseni Dec 5, 2025
bd2ee9b
Merge pull request #451 from DDMAL/rtl-exception-fix
PouyaMohseni Dec 11, 2025
944690d
feat(auth): add email verification workflow with rate limiting
yinanazhou Dec 12, 2025
e56019f
chore: rename `**/registration/**` to `**/auth/**`
yinanazhou Dec 12, 2025
db7f250
test: update auth tests for registration workflow changes
yinanazhou Dec 12, 2025
bc1cb80
fix: validate next parameter to prevent open redirect attacks
yinanazhou Dec 17, 2025
806c686
fix: check for unverified accounts before form validation
yinanazhou Dec 17, 2025
e70313f
refactor: reorder rate limit check for email resending
yinanazhou Dec 17, 2025
333d8dc
fix: add redirect authenticated users to custom login
yinanazhou Dec 17, 2025
e49d733
test: increase timeout in CI
yinanazhou Dec 17, 2025
8717cec
test: use `html[lang]` instead of cookies in GT E2E test
yinanazhou Dec 17, 2025
dbcd878
refactor: make resend verification cooldown atomic with cache.add()
yinanazhou Dec 17, 2025
97e4558
fix: clear stale pending verification session for unverified account
yinanazhou Dec 17, 2025
8f57cff
test: disable GT script loading for most E2E tests to prevent 429
yinanazhou Dec 18, 2025
99eb613
fix: set cooldown on expiration to prevent race condition
yinanazhou Dec 18, 2025
d3742b3
fix: verify password for existing unverified accounts when register
yinanazhou Dec 19, 2025
da3eebd
fix: show all active users on home page
PouyaMohseni Dec 18, 2025
677e9b2
feat: set all the default values in Statistics Section to 0
PouyaMohseni Dec 20, 2025
9f3da9b
feat: switch to Masonry view on small screens
PouyaMohseni Dec 21, 2025
1515530
Revert "feat: switch to Masonry view on small screens"
PouyaMohseni Dec 21, 2025
17bb9fa
Merge pull request #460 from DDMAL/email-wkflow
yinanazhou Jan 8, 2026
da7880d
Merge pull request #461 from DDMAL/editors_count
PouyaMohseni Jan 9, 2026
1b62609
test(e2e): refactor Google Translate with config modes
yinanazhou Jan 9, 2026
00e17aa
fix: limit table height only if more than 5 labels
PouyaMohseni Jan 18, 2026
4fba34d
Merge pull request #495 from DDMAL/gt-test
yinanazhou Jan 18, 2026
b3efd01
ci: add automated release workflow with deployment options
yinanazhou Jan 13, 2026
cea527b
ci: add rollback to production
yinanazhou Jan 16, 2026
c12c5e4
ci: add step to validate version input
yinanazhou Jan 18, 2026
31f81d3
ci: queue prod deployment instead of cancel
yinanazhou Jan 18, 2026
8afe323
chore: update black version in pre-commit configuration to 26.1.0
yinanazhou Jan 18, 2026
e624c5c
Merge pull request #499 from DDMAL/ci-prod
yinanazhou Jan 18, 2026
2d84e64
ci: fix version assignment in deployment workflow
yinanazhou Jan 19, 2026
ad2bf1d
Merge pull request #506 from DDMAL/ci-prod
yinanazhou Jan 20, 2026
235e95b
ci: fix error message for invalid deploy version
yinanazhou Jan 20, 2026
51d4bcc
Merge pull request #507 from DDMAL/ci-prod
yinanazhou Jan 20, 2026
c163eaa
feat: add max for Go To Page in pagination
PouyaMohseni Dec 24, 2025
afefb69
fix: handle multiple `Go To Page` inputs
PouyaMohseni Dec 24, 2025
753b43f
fix: use edismax to support special characters in Solr contextual que…
PouyaMohseni Dec 21, 2025
9403fba
feat: add rtl/ltr direction support for adding instrument name
PouyaMohseni Dec 3, 2025
b11fc31
fix: move inline script from `addName.html` to `AddName.ts`
PouyaMohseni Dec 4, 2025
f31bd2e
refactor: move `readLanguagesFromPage` to utils and rename to `getLan…
PouyaMohseni Dec 11, 2025
5b7e3cd
fix: add `notranslate` to username in the navbar drop down
PouyaMohseni Dec 12, 2025
ae7e4ff
fix: add `notranslate` to the shown search query in instruments page
PouyaMohseni Dec 13, 2025
52f64c3
fix: add `notranslate` to the `About` page
PouyaMohseni Dec 13, 2025
c4b6836
fix: add `notranslate` to dropdown language menu
PouyaMohseni Dec 17, 2025
94ddf56
Merge pull request #475 from DDMAL/fix-page-option
PouyaMohseni Jan 21, 2026
c85c4cc
Merge pull request #469 from DDMAL/invalid-query
PouyaMohseni Jan 21, 2026
d9ae3a3
Merge pull request #504 from DDMAL/table-height
PouyaMohseni Jan 21, 2026
9956e5a
Merge pull request #448 from DDMAL/rtl-support-add-inst
PouyaMohseni Jan 21, 2026
77f6f50
fix: add http error handling
yinanazhou Jan 23, 2026
a5ff62c
Merge pull request #509 from DDMAL/fix-http
yinanazhou Jan 23, 2026
b0aca63
chore: update LLM files in `.gitignore`
yinanazhou Jan 26, 2026
4f6680e
feat(instruments): init instrument creation feature
yinanazhou Feb 5, 2026
ca9a723
feat: init instrument deletion feature
yinanazhou Feb 6, 2026
6110c55
chore: update vite config
yinanazhou Feb 6, 2026
eb871a5
test: update instrument url to use `umil_id`
yinanazhou Feb 6, 2026
ee6e146
ci: update pre commit version & config
yinanazhou Feb 6, 2026
c296de1
refactor: extract shared NameRowManager and unify patterns
yinanazhou Feb 6, 2026
f2c14fa
test: CRUD test for name and instrument
yinanazhou Feb 6, 2026
f8656f3
fix: add html direction null check
yinanazhou Feb 6, 2026
6a337e9
chore: remove duplicate entries in .gitignore
yinanazhou Feb 6, 2026
a80cdba
chore: update `docker-compose` to `docker compose`
yinanazhou Feb 6, 2026
086d662
fix: correct syntax for error message
yinanazhou Feb 6, 2026
48d06ae
chore: add comment for Wikidata `languageinfo`
yinanazhou Feb 6, 2026
0b46f56
fix: index add/delete names
yinanazhou Feb 6, 2026
b6815a2
Merge pull request #513 from DDMAL/create_inst
yinanazhou Feb 10, 2026
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
13 changes: 13 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@ HOST_NAME=umil.linkedmusic.ca
POSTGRES_DB=virtual_instrument_museum
#POSTGRES_USER=ADD USER HERE
#POSTGRES_PASSWORD=ADD PASSWORD HERE

# TEST DATABASE
TEST_POSTGRES_DB=vim_test_db
TEST_POSTGRES_USER=test_user
TEST_POSTGRES_PASSWORD=test_password

## EMAIL ##
# PROD MODE ONLY
# EMAIL_HOST=
# EMAIL_PORT=
# EMAIL_HOST_USER=
# EMAIL_HOST_PASSWORD=
# DEFAULT_FROM_EMAIL=
24 changes: 24 additions & 0 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Auto Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
90 changes: 74 additions & 16 deletions .github/workflows/cd_prod.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
name: Deploy to Production Server
on: workflow_dispatch

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "Release version to deploy (e.g., v1.0.0). Leave empty for latest main."
required: false
type: string

concurrency:
group: production
cancel-in-progress: true
cancel-in-progress: false # In prod, queue the deployment if multiple are requested

jobs:
deploy-production:
runs-on: ubuntu-latest
env:
DEPLOY_VERSION: ${{ github.event.inputs.version || github.event.release.tag_name || 'main' }}
steps:
- name: Checkout the current repo
uses: actions/checkout@v5
Expand All @@ -16,30 +27,77 @@ jobs:
with:
key: ${{ secrets.KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Stop the current Docker containers running
- name: Validate deploy version input
run: |
set -euo pipefail
if [[ "$DEPLOY_VERSION" == "main" ]]; then
echo "SAFE_DEPLOY_VERSION=$DEPLOY_VERSION" >> "$GITHUB_ENV"
exit 0
fi
if [[ "$DEPLOY_VERSION" =~ ^v[0-9]+(\.[0-9]+){2}(-[0-9A-Za-z.-]+)?$ ]]; then
echo "SAFE_DEPLOY_VERSION=$DEPLOY_VERSION" >> "$GITHUB_ENV"
exit 0
fi
if [[ "$DEPLOY_VERSION" =~ ^[0-9a-f]{7,40}$ ]]; then
echo "SAFE_DEPLOY_VERSION=$DEPLOY_VERSION" >> "$GITHUB_ENV"
exit 0
fi
echo "::error::Invalid deploy version format: $DEPLOY_VERSION"
exit 1
- name: Record current deployed version for rollback
run: |
ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST_PROD }} ${{ secrets.USERNAME }}@${{ secrets.HOST_PROD }} \
"cd /virtual-instrument-museum &&
sudo docker compose stop"
- name: Fetch new updates from remote `origin` and log current branches
sudo bash -c 'CURRENT_VERSION=\$(git describe --tags --exact-match 2>/dev/null || git rev-parse HEAD); echo \"\$CURRENT_VERSION\" > /virtual-instrument-museum/.last_deployed'"
- name: Fetch updates and validate target version
run: |
ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST_PROD }} ${{ secrets.USERNAME }}@${{ secrets.HOST_PROD }} \
"cd /virtual-instrument-museum &&
sudo git fetch origin -v &&
sudo git branch -v"
- name: Checkout to `main` branch and pull new changes
"set -euo pipefail;
VERSION=\"${SAFE_DEPLOY_VERSION}\";
cd /virtual-instrument-museum;
sudo git fetch origin -v --tags;
if [ \"\$VERSION\" != 'main' ]; then
if ! sudo git rev-parse --verify --quiet \"\$VERSION^{commit}\" >/dev/null; then
echo \"::error::Invalid deploy version: \$VERSION\";
exit 1;
fi;
fi"
- name: Stop the current Docker containers running
run: |
ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST_PROD }} ${{ secrets.USERNAME }}@${{ secrets.HOST_PROD }} \
"cd /virtual-instrument-museum &&
sudo git checkout main &&
sudo git pull origin main"
- name: Build docker images
sudo docker compose stop"
- name: Deploy target version
id: deploy_target
continue-on-error: true
run: |
ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST_PROD }} ${{ secrets.USERNAME }}@${{ secrets.HOST_PROD }} \
"cd /virtual-instrument-museum &&
sudo docker compose -f docker-compose-deployment.yml build --no-cache"
- name: Start the services
"set -euo pipefail;
VERSION=\"${SAFE_DEPLOY_VERSION}\";
cd /virtual-instrument-museum;
sudo git checkout \"\$VERSION\";
if [ \"\$VERSION\" = 'main' ]; then sudo git pull origin main; fi;
sudo docker compose -f docker-compose-deployment.yml build --no-cache;
sudo docker compose -f docker-compose-deployment.yml up -d --wait --wait-timeout 180"
- name: Roll back to last deployed version
if: ${{ steps.deploy_target.outcome != 'success' }}
run: |
ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST_PROD }} ${{ secrets.USERNAME }}@${{ secrets.HOST_PROD }} \
"set -euo pipefail;
cd /virtual-instrument-museum;
if [ ! -f /virtual-instrument-museum/.last_deployed ]; then
echo 'No rollback version found';
exit 1;
fi;
ROLLBACK_VERSION=\$(cat /virtual-instrument-museum/.last_deployed);
sudo git checkout \$ROLLBACK_VERSION;
sudo docker compose -f docker-compose-deployment.yml build --no-cache;
sudo docker compose -f docker-compose-deployment.yml up -d --wait --wait-timeout 180;
echo '::error::Rollback executed; marking workflow as failed.';
exit 1"
- name: Record successful deploy version
if: ${{ steps.deploy_target.outcome == 'success' }}
run: |
ssh -J ${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST1 }},${{ secrets.PROXY_USERNAME }}@${{ secrets.PROXY_HOST_PROD }} ${{ secrets.USERNAME }}@${{ secrets.HOST_PROD }} \
"cd /virtual-instrument-museum &&
sudo docker compose -f docker-compose-deployment.yml up -d"
sudo bash -c 'CURRENT_VERSION=\$(git describe --tags --exact-match 2>/dev/null || git rev-parse HEAD); echo \"\$CURRENT_VERSION\" > /virtual-instrument-museum/.last_deployed; echo \"Deployed: \$CURRENT_VERSION\"'"
12 changes: 6 additions & 6 deletions .github/workflows/ci_build_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: CI - Test Docker build for deployment

on:
push:
branches: [ develop, main ]
branches: [develop, main]
pull_request:
branches: [ develop ]
branches: [develop]
workflow_dispatch:

jobs:
ci-build-deployment:
runs-on: ubuntu-latest
env:
HOST_NAME: umil.linkedmusic.ca
DJANGO_SECRET_KEY: ${{ secrets.CI_DJANGO_SECRET_KEY }}
DJANGO_SECRET_KEY: ${{ secrets.CI_DJANGO_SECRET_KEY }}
POSTGRES_DB: virtual_instrument_museum
POSTGRES_USER: ${{ secrets.CI_POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.CI_POSTGRES_PASSWORD }}
Expand All @@ -25,11 +25,11 @@ jobs:
uses: docker/setup-compose-action@v1
with:
version: latest

- name: Build UMIL with Production compose file
run: |
docker compose -f docker-compose-deployment.yml build

- name: List built Docker images
run: |
docker images
docker images
95 changes: 95 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: E2E Tests
on: [push, pull_request]

jobs:
e2e-tests:
name: Run E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v4

# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: web-app/frontend/package-lock.json

# Step 3: Install frontend dependencies
- name: Install dependencies
working-directory: web-app/frontend
run: npm ci

# Step 4: Install Playwright browsers
- name: Install Playwright Browsers
working-directory: web-app/frontend
run: npx playwright install --with-deps chromium firefox webkit

# Step 4.5: Build frontend assets
# Nginx mounts ./web-app/frontend/assets/ from the host,
# so we need to build assets BEFORE starting Docker containers.
# Otherwise CSS/JS won't load properly in tests.
- name: Build frontend assets
working-directory: web-app/frontend
run: |
npm run sass:build
npm run build
echo "Verifying build output..."
ls -la assets/css/ dist/
test -f dist/manifest.json || (echo "ERROR: manifest.json not found!" && exit 1)
test -d assets/css || (echo "ERROR: CSS directory not found!" && exit 1)

# Step 5: Create environment file for Docker Compose
- name: Create .env file
run: |
cat > .env << EOF
# Test Database Configuration
TEST_POSTGRES_DB=vim_test
TEST_POSTGRES_USER=vim_test_user
TEST_POSTGRES_PASSWORD=vim_test_password

# Application Configuration
HOST_NAME=localhost
DJANGO_SECRET_KEY=test-secret-key-for-ci-only-not-for-production
EOF

# Step 6: Start Docker Compose services and wait for healthchecks
- name: Start Docker Compose
run: docker compose -f docker-compose-test.yml up -d --wait

# Step 7: Check Docker services status
# - name: Check Docker services
# run: docker compose -f docker-compose-test.yml ps

# Step 8: Run E2E tests
- name: Run Playwright tests
working-directory: web-app/frontend
run: npm run test:e2e

# Step 9: Upload Playwright report (on failure)
- name: Upload Playwright Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: web-app/frontend/tests/playwright-report/
retention-days: 30

# Step 10: Upload test results (on failure)
- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: web-app/frontend/tests/test-results/
retention-days: 30

# Step 11: Clean up - Stop and remove Docker containers
- name: Stop Docker Compose
if: always()
run: docker compose -f docker-compose-test.yml down -v
25 changes: 25 additions & 0 deletions .github/workflows/frontend_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Frontend Tests
on: [push, pull_request]

jobs:
frontend-unit-tests:
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: web-app/frontend/package-lock.json

- name: Install dependencies
working-directory: web-app/frontend
run: npm ci

- name: Run unit tests
working-directory: web-app/frontend
run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/python_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
- uses: psf/black@stable
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,13 @@ venv
web-app/frontend/dist/
web-app/frontend/node_modules/
web-app/frontend/assets/css/

# Playwright test artifacts
web-app/frontend/tests/.auth/
web-app/frontend/tests/test-results/
web-app/frontend/tests/playwright-report/

# LLM
.cursor/
.claude/
CLAUDE.md
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1a1
rev: 26.1.0
hooks:
- id: black

Expand All @@ -14,7 +14,9 @@ repos:
require_serial: false

- repo: https://github.com/djlint/djLint
rev: v1.34.1
rev: v1.36.4
hooks:
- id: djlint-reformat-django
args: [--configuration=.djlintrc]
- id: djlint-django
args: [--configuration=.djlintrc]
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Frontend tests (Vitest)
test-frontend:
docker compose exec app npm test --prefix /virtual-instrument-museum/frontend

.PHONY: test-frontend

Loading