-
Notifications
You must be signed in to change notification settings - Fork 7
147 lines (131 loc) · 5.04 KB
/
playwright.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Playwright Tests
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
workflow_dispatch:
env:
TERM: xterm
jobs:
playwright-run:
runs-on: ubuntu-22.04
services:
postgres:
image: mattermostdevelopment/mirrored-postgres:12
env:
POSTGRES_USER: mmuser
POSTGRES_PASSWORD: mostest
POSTGRES_DB: mattermost_test
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
minio:
image: minio/minio:RELEASE.2024-06-22T05-26-45Z
env:
MINIO_ACCESS_KEY: minioaccesskey
MINIO_SECRET_KEY: miniosecretkey
MINIO_SSE_MASTER_KEY: "my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574"
inbucket:
image: mattermost/inbucket:release-1.2.0
ports:
- 10080:10080
- 10110:10110
- 10025:10025
mattermost-server:
image: mattermostdevelopment/mattermost-enterprise-edition:master
env:
DB_HOST: postgres
DB_PORT_NUMBER: 5432
MM_DBNAME: mattermost_test
MM_USERNAME: mmuser
MM_PASSWORD: mostest
CI_INBUCKET_HOST: inbucket
CI_INBUCKET_PORT: 10080
CI_MINIO_HOST: minio
IS_CI: true
MM_LICENSE: "${{ secrets.MM_E2E_TEST_LICENSE_ONPREM_ENT }}"
MM_SERVICEENVIRONMENT: test
MM_CLUSTERSETTINGS_READONLYCONFIG: false
MM_EMAILSETTINGS_SMTPSERVER: inbucket
MM_EMAILSETTINGS_SMTPPORT: 10025
MM_SQLSETTINGS_DATASOURCE: "postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10"
MM_SQLSETTINGS_DRIVERNAME: postgres
MM_PLUGINSETTINGS_ENABLEUPLOADS: true
MM_SERVICESETTINGS_SITEURL: http://localhost:8065
MM_PLUGINSETTINGS_AUTOMATICPREPACKAGEDPLUGINS: false
ports:
- 8065:8065
env:
MM_SERVICESETTINGS_SITEURL: http://localhost:8065
MM_ADMIN_EMAIL: [email protected]
MM_ADMIN_USERNAME: sysadmin
MM_ADMIN_PASSWORD: Sys@dmin-sample1
steps:
- name: ci/checkout-repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: mattermost-plugin-legal-hold
- name: ci/setup-go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: mattermost-plugin-legal-hold/go.mod
cache: true
- name: ci/setup-node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: "mattermost-plugin-legal-hold/.nvmrc"
- name: ci/create-admin-user
run: |
STATUSCODE=$(curl -X POST -H "Content-Type: application/json" -d '{"email": "'${MM_ADMIN_EMAIL}'", "username": "'${MM_ADMIN_USERNAME}'", "password": "'${MM_ADMIN_PASSWORD}'"}' ${MM_SERVICESETTINGS_SITEURL}/api/v4/users -w "%{http_code}" -o /dev/stderr)
if test $STATUSCODE -ne 201; then exit 1; fi
- name: ci/install-go-dependencies
working-directory: ./mattermost-plugin-legal-hold
run: go mod tidy
- name: ci/install-plugin-webapp-deps
working-directory: ./mattermost-plugin-legal-hold/webapp
run: npm ci
- name: ci/build-and-install-plugin
working-directory: ./mattermost-plugin-legal-hold
run: make deploy
- name: ci/checkout-mattermost-monorepo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: mattermost/mattermost
path: mattermost
- name: ci/setup-node-for-mattermost-monorepo
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: "mattermost/.nvmrc"
- name: ci/install-mattermost-monorepo-webapp-deps
working-directory: ./mattermost/webapp
run: npm ci
- name: ci/install-mattermost-monorepo-playwright-deps
working-directory: ./mattermost/e2e-tests/playwright
run: npm ci
- name: ci/install-plugin-playwright-deps
working-directory: ./mattermost-plugin-legal-hold/e2e/playwright
run: npm ci
- name: ci/check
working-directory: ./mattermost-plugin-legal-hold/e2e/playwright
run: npm run check
- name: ci/run-playwright-tests
working-directory: ./mattermost-plugin-legal-hold/e2e/playwright
run: npm run test-ci
env:
PW_BASE_URL: ${{ env.MM_SERVICESETTINGS_SITEURL }}
PW_ENSURE_PLUGINS_INSTALLED: com.mattermost.plugin-legal-hold
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: success() || failure()
with:
name: test-results
path: |
mattermost-plugin-legal-hold/e2e/playwright/results
mattermost-plugin-legal-hold/e2e/playwright/test-results