-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (70 loc) · 2.04 KB
/
testE2E.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Playwright E2E Tests
on:
push:
branches:
- main
jobs:
e2e_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwoff1 \
libvpx7 \
libevent-2.1-7 \
libopus0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-gl \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio \
gstreamer1.0-plugins-bad \
libharfbuzz-icu0 \
libhyphen0 \
libmanette-0.2-0 \
flite \
mesa-utils \
libx264-dev || true # Ignorar errores de paquetes faltantes
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Install Node.js dependencies
run: |
npm install
npx playwright install
working-directory: testsE2E
- name: Run Django migrations
run: python manage.py migrate
- name: Start Django server
run: python manage.py runserver 127.0.0.1:8000 &
env:
DJANGO_SETTINGS_MODULE: SoftServeAcademy.settings
- name: Run Playwright tests
run: npx playwright test
working-directory: testsE2E
- name: Copy Playwright test report to /tests/
run: |
mkdir -p tests
cp -r testsE2E/playwright-report/* tests/
- name: Upload Playwright test report as artifact
if: always() # Se sube siempre, tanto en éxito como en fallo
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: testsE2E/playwright-report