-
Notifications
You must be signed in to change notification settings - Fork 61
103 lines (87 loc) · 2.93 KB
/
javascript-front-e2e.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Front - e2e
on: workflow_dispatch
jobs:
e2e-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: taiga
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: '--health-cmd "pg_isready" --health-interval 5s --health-timeout 5s --health-retries 6 --health-start-period 20s'
steps:
- uses: actions/checkout@v3
- name: Postgres restore fixture
run: |
pg_restore --no-privileges --no-owner --dbname="postgres://postgres:postgres@localhost:5432/taiga" "./.github/sql-fixtures/fixtures.sql"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
**/setup.py
**/setup.cfg
**/requirements/*.txt
- name: Install requirements
working-directory: ./python/apps/taiga
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements/devel.txt
python -m pip install -e .
- name: Run back server
working-directory: ./python/apps/taiga
run: |
python -m taiga devserve -w > taiga-back.log 2> taiga-back.err &
env:
TAIGA_EVENTS__PUBSUB_BACKEND: "memory"
TAIGA_DEBUG: true
TAIGA_DB_NAME: taiga
TAIGA_DB_USER: postgres
TAIGA_DB_PASSWORD: postgres
TAIGA_DB_HOST: localhost
TAIGA_DB_PORT: 5432
TAIGA_SECRET_KEY: secret
TAIGA_ACCESS_TOKEN_LIFETIME: 1000000
- name: Node
uses: actions/setup-node@v3
with:
node-version-file: "./javascript/.nvmrc"
cache: "npm"
cache-dependency-path: javascript/package-lock.json
- name: Install dependencies
working-directory: ./javascript
run: npm ci
shell: bash
- name: Default config
working-directory: ./javascript
run: npm run default-config
- name: Email serve
working-directory: ./javascript
run: npm run email:serve &
- name: Cypress run
uses: cypress-io/github-action@v5
env:
DEBUG: "@cypress/github-action"
with:
install: false
command: npm run e2e
working-directory: ./javascript/
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: javascript/dist/cypress/apps/taiga-e2e/screenshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: javascript/dist/cypress/apps/taiga-e2e/videos