This repository was archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (62 loc) · 3 KB
/
Copy pathmain.yml
File metadata and controls
66 lines (62 loc) · 3 KB
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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12', '10' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Pull and start mattermost-preview image
run: docker run --name mattermost-preview -d --publish 8065:8065 --add-host dockerhost:127.0.0.1 mattermost/mattermost-preview
- name: Wait until server is running
run: sleep 60
- name: Create test users
run: |
docker exec mattermost-preview bash -c ' \
mattermost user create --system_admin --email admin@example.com --username admin --password Admin12345! && \
mattermost user create --email user@example.com --username user --password User12345! && \
mattermost team create --name privateteam --display_name "Private Team" --private && \
mattermost team add privateteam admin@example.com user@example.com && \
mattermost channel create --team privateteam --name privatechannel --display_name "My Private Channel" --private && \
mattermost channel create --team privateteam --name publicchannel --display_name "My Public Channel" && \
mattermost channel add privateteam:privatechannel admin@example.com user@example.com && \
mattermost channel add privateteam:publicchannel admin@example.com user@example.com'
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test
build_latest:
runs-on: ubuntu-latest
name: Node latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '*'
- name: Pull and start mattermost-preview image
run: docker run --name mattermost-preview -d --publish 8065:8065 --add-host dockerhost:127.0.0.1 mattermost/mattermost-preview
- name: Wait until server is running
run: sleep 60
- name: check node version
run: node -v
- name: Create test users
run: |
docker exec mattermost-preview bash -c ' \
mattermost user create --system_admin --email admin@example.com --username admin --password Admin12345! && \
mattermost user create --email user@example.com --username user --password User12345! && \
mattermost team create --name privateteam --display_name "Private Team" --private && \
mattermost team add privateteam admin@example.com user@example.com && \
mattermost channel create --team privateteam --name privatechannel --display_name "My Private Channel" --private && \
mattermost channel create --team privateteam --name publicchannel --display_name "My Public Channel" && \
mattermost channel add privateteam:privatechannel admin@example.com user@example.com && \
mattermost channel add privateteam:publicchannel admin@example.com user@example.com'
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test