-
Notifications
You must be signed in to change notification settings - Fork 64
102 lines (87 loc) · 3.8 KB
/
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
name: E2E Testing
on:
pull_request:
jobs:
prepare-test-server:
runs-on: ubuntu-22.04
env:
# COMPOSE_PROJECT_NAME: "${{ github.run_id }}_playwright_${{ matrix.run_id }}"
COMPOSE_PROJECT_NAME: "${{ github.run_id }}_playwright_1"
# strategy:
# matrix:
# run_id: [1, 2, 3, 4]
steps:
- name: e2e/checkout-mattermost-plugin-calls-repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: e2e/checkout-mattermost-repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: mattermost/mattermost
path: mattermost
- name: e2e/setup-docker-buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: e2e/setup-go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
- name: e2e/setup-node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: webapp/package-lock.json
- name: e2e/generate-configuration
working-directory: ./mattermost/server/scripts/config_generator
env:
OUTPUT_CONFIG: ${{ github.workspace }}/config/config.json
run: |
mkdir -p ${{ github.workspace }}/config
go run main.go
- name: e2e/patch-generated-configuration
env:
OUTPUT_CONFIG: ${{ github.workspace }}/config/config.json
run: |
cp ${OUTPUT_CONFIG} ${OUTPUT_CONFIG}.orig
jq -f ${{ github.workspace }}/e2e/overlay-config.jq ${OUTPUT_CONFIG}.orig > ${OUTPUT_CONFIG}
diff ${OUTPUT_CONFIG}.orig ${OUTPUT_CONFIG} || true
- name: e2e/build-mattermost-plugin-calls
env:
MM_SERVICESETTINGS_ENABLEDEVELOPER: 1
run: make dist
- name: e2e/prepare-server
env:
DOCKER_CLIENT_TIMEOUT: 120
COMPOSE_HTTP_TIMEOUT: 120
IMAGE_CALLS_OFFLOADER: mattermost/calls-offloader:v0.8.0
IMAGE_CALLS_RECORDER: mattermost/calls-recorder:v0.7.1
IMAGE_CALLS_TRANSCRIBER: mattermost/calls-transcriber:v0.2.1
IMAGE_SERVER: mattermostdevelopment/mattermost-enterprise-edition:master
DOCKER_NETWORK: ${{ env.COMPOSE_PROJECT_NAME }}
DOCKER_COMPOSE_FILE: mattermost/server/build/gitlab-dc.postgres.yml
DOCKER_COMPOSE_TEST_DATA: mattermost/server/tests/test-data.ldif
CONTAINER_SERVER: ${{ env.COMPOSE_PROJECT_NAME }}_server_1
run: |
mkdir -p ${{ github.workspace }}/logs
mkdir -p ${{ github.workspace }}/config
mkdir -p ${{ github.workspace }}/dotenv
./e2e/scripts/prepare-server.sh
mkdir -p dotenv
echo "MM_LICENSE=${{ secrets.MM_PLUGIN_CALLS_TEST_LICENSE }}" >> dotenv/app.private.env
echo "MM_FEATUREFLAGS_BoardsProduct=true" >> dotenv/app.private.env
echo "MM_SERVICEENVIRONMENT=test" >> dotenv/app.private.env
chown -R 2000:2000 ${{ github.workspace }}/config
chown -R 2000:2000 ${{ github.workspace }}/logs
docker run -d --rm --name ${CONTAINER_SERVER} \
--net ${DOCKER_NETWORK} \
--net-alias mm-server \
--user mattermost:mattermost \
--env-file="${{ github.workspace }}/dotenv/app.private.env" \
-v ${{ github.workspace }}/config:/mattermost/config \
-v ${{ github.workspace }}/logs:/mattermost/logs \
${IMAGE_SERVER} \
sh -c "/mattermost/bin/mattermost server"
# - name: e2e/execute-tests
# working-directory: e2e
# run: |
# cp ${{ github.workspace }}/plugin.json plugin.json
# ./e2e/run.sh