-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (46 loc) · 1.44 KB
/
e2e_tests.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
name: e2e tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
cypress-run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Postgres
run: docker run -d -e POSTGRES_DB=guillotina -e POSTGRES_USER=guillotina -e POSTGRES_HOST_AUTH_METHOD=trust -p 127.0.0.1:5532:5432 --name postgres postgres:12.17
- name: Build guillotina
run: docker build -t guillotina_e2e .
working-directory: "guillotina_example/guillotina_react_app"
- name: Run guillotina
run: docker run -d --link=postgres -p 0.0.0.0:8080:8080 guillotina_e2e:latest
- name: Install base modules and build dist
run: yarn
- name: Start Server
run: npm install && npm run build && npm run preview &
working-directory: e2e/vite_example
- name: Cypress run
uses: cypress-io/github-action@v6
with:
build: npm install
wait-on: 'http://localhost:4173'
working-directory: e2e
- name: Artifacts
uses: actions/upload-artifact@v1
if: always()
with:
name: cypress-videos
path: e2e/cypress/videos