-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (77 loc) · 2 KB
/
ui-workflow.yaml
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
name: Lagoon UI CI
on:
pull_request:
branches:
- main
push:
branches:
- main
- cypress-test
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: yarn
- name: Checkout Repository
uses: actions/checkout@v4
- name: Formatting check
run: |
yarn add [email protected] @trivago/prettier-plugin-sort-imports
yarn format-check
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Linting
run: |
yarn add [email protected]
yarn lint
cypress-tests:
runs-on: ubuntu-latest
needs: [format-check, lint]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build and start Lagoon-minimal
run: |
cd test
make up
- name: Start ui
env:
GRAPHQL_API: http://0.0.0.0:33000/graphql
KEYCLOAK_API: http://0.0.0.0:38088/auth
run: |
yarn install
yarn build
yarn start &
- name: Run RBAC Cypress Tests
uses: cypress-io/github-action@v6
with:
config-file: ./cypress/cypress.config.ts
auto-cancel-after-failures: 1
wait-on: 'http://localhost:3000'
command: yarn cypress:runRbac
- name: Run General Cypress Tests
uses: cypress-io/github-action@v6
with:
config-file: ./cypress/cypress.config.ts
auto-cancel-after-failures: 1
wait-on: 'http://localhost:3000'
command: yarn cypress:runGeneral
- name: Run Organization Cypress Tests
uses: cypress-io/github-action@v6
with:
config-file: ./cypress/cypress.config.ts
auto-cancel-after-failures: 1
wait-on: 'http://localhost:3000'
command: yarn cypress:runOrganizations
- name: Stop Docker containers
run: |
cd test
make down