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

Feat/cytoplaywright #124

Merged
merged 11 commits into from
Aug 4, 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
32 changes: 3 additions & 29 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@ steps:
- npm -v
- npm ci

- name: test
image: cypress/included:13.7.0
pull: always
environment:
VITE_DIRECTUS_URL:
from_secret: directus_url_new
VITE_DIRECTUS_TOKEN:
from_secret: directus_token_new
commands:
- npm run test
when:
branch:
exclude:
- master

- name: build staging
image: node:20
pull: always
Expand Down Expand Up @@ -124,6 +109,7 @@ steps:
source:
- ./build
- ./docker-compose.prod.yml
- ./nginx.conf
overwrite: true
when:
branch:
Expand All @@ -143,10 +129,8 @@ steps:
passphrase:
from_secret: passphrase
script:
- pwd
- cd /srv/lf/website/prod
- docker-compose -f docker-compose.prod.yml down
- pwd
- rsync -ravI ./deploy/ . --delete-after
- rm -rf ./deploy
- docker-compose -f docker-compose.prod.yml up -d --build
Expand Down Expand Up @@ -176,18 +160,6 @@ steps:
- npm -v
- npm ci

- name: test
image: cypress/included:13.7.0
pull: always
environment:
CYPRESS_CACHE_FOLDER: .cypress
VITE_DIRECTUS_URL:
from_secret: directus_url_new
VITE_DIRECTUS_TOKEN:
from_secret: directus_token_new
commands:
- npm run test

- name: build production
image: node:20
pull: always
Expand Down Expand Up @@ -216,6 +188,7 @@ steps:
source:
- ./build
- ./docker-compose.prod.yml
- ./nginx.conf
overwrite: true

- name: restart production server
Expand All @@ -233,6 +206,7 @@ steps:
from_secret: passphrase
script:
- cd /srv/lf/website/prod
- docker-compose -f docker-compose.prod.yml down
- rsync -ravI ./deploy/ . --delete-after
- rm -rf ./deploy
- docker-compose -f docker-compose.prod.yml up -d --build
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Playwright Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
env:
VITE_DIRECTUS_URL: ${{ secrets.DIRECTUS_URL }}
VITE_DIRECTUS_TOKEN: ${{ secrets.DIRECTUS_TOKEN }}
run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ build/
.env

.DS_Store
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
14 changes: 0 additions & 14 deletions cypress.config.ts

This file was deleted.

34 changes: 0 additions & 34 deletions cypress/e2e/artists.cy.ts

This file was deleted.

69 changes: 0 additions & 69 deletions cypress/e2e/navigation.cy.ts

This file was deleted.

81 changes: 0 additions & 81 deletions cypress/e2e/projects.cy.ts

This file was deleted.

25 changes: 0 additions & 25 deletions cypress/support/commands.js

This file was deleted.

20 changes: 0 additions & 20 deletions cypress/support/e2e.js

This file was deleted.

8 changes: 0 additions & 8 deletions cypress/tsconfig.json

This file was deleted.

3 changes: 2 additions & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ services:
restart: unless-stopped
volumes:
- ./build:/srv
- ./nginx.conf:/usr/local/nginx/conf/sites/default.conf
networks:
- proxy
ports:
- 80:80
- 80
labels:
- traefik.enable=true
- traefik.http.services.lf-website-prod.loadbalancer.server.port=80
Expand Down
Loading