Skip to content

[frontend] feat: Logout logic #51

[frontend] feat: Logout logic

[frontend] feat: Logout logic #51

name: Frontend Service Tests - Playwright
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
env:
API_URL: http://localhost:5000
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Create .env file
run: |
cd ./backend
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" > .env
- name: Start service in docker
run: |
cd ./backend
npm run docker:up
- name: Wait for service to start
run: |
sleep 15
- name: Test connectivity
run: curl ${API_URL}
- name: Install and start frontend
run: |
cd ./frontend
npm ci
npm run build
npm run start &
- name: Install Playwright
run: |
cd ./playwright
npm ci
npx playwright install chromium
- name: Run Playwright Tests
run: |
cd ./playwright
npm run test
- name: Stop service in docker
run: |
cd ./backend
npm run docker:down