-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (105 loc) · 5.09 KB
/
behavioural_tests.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: API & Behavioural Tests (Behat)
on:
pull_request:
jobs:
api:
name: API Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['12.5']
php-version: ['7.2']
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
# test the lowest version, to make sure checks pass on it
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
# See https://github.community/t/sudo-apt-install-fails-with-failed-to-fetch-http-security-ubuntu-com-404-not-found-ip/17075
- run: sudo apt update
- name: Install dependencies
run: |
sudo composer self-update -q
sudo COMPOSER_MEMORY_LIMIT=-1 COMPOSER_PROCESS_TIMEOUT=60 composer update --prefer-dist --no-progress
./bin/console bolt:info --ansi
npm set progress=false
npm ci
mkdir -p ./var/log/e2e-reports/report/features/
touch ./var/log/e2e-reports/report/features/.gitkeep
# Install latest stable Chrome for e2e tests
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome*.deb
- name: Prepare environment
run: |
# build assets
npm run build
sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/
# prepare web server for e2e tests
./bin/console doctrine:database:create
./bin/console doctrine:schema:create
./bin/console doctrine:fixtures:load --group=without-images -n
./bin/console server:start 127.0.0.1:8088
# test if web server works
sleep 3
wget "http://127.0.0.1:8088/bolt/login"
- name: run API tests
run: make behat-api-quiet
e2e:
name: E2E Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['12.5']
php-version: ['7.2']
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
# test the lowest version, to make sure checks pass on it
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
- uses: nanasess/setup-chromedriver@master
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# See https://github.community/t/sudo-apt-install-fails-with-failed-to-fetch-http-security-ubuntu-com-404-not-found-ip/17075
- run: sudo apt update
- name: Install dependencies
run: |
sudo composer self-update -q
sudo COMPOSER_MEMORY_LIMIT=-1 COMPOSER_PROCESS_TIMEOUT=60 composer update --prefer-dist --no-progress
./bin/console bolt:info --ansi
npm set progress=false
npm ci
mkdir -p ./var/log/e2e-reports/report/features/
touch ./var/log/e2e-reports/report/features/.gitkeep
# Install latest stable Chrome for e2e tests
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome*.deb
- name: Prepare environment
run: |
# build assets
npm run build
sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/
# prepare web server for e2e tests
./bin/console doctrine:database:create
./bin/console doctrine:schema:create
./bin/console doctrine:fixtures:load --group=without-images -n
./bin/console server:start 127.0.0.1:8088
# test if web server works
sleep 3
wget "http://127.0.0.1:8088/bolt/login"
- name: Install latest Google Chrome (for e2e tests)
run: wget -q https://script.install.devinsideyou.com/google-chrome && chmod +x google-chrome
- name: run e2e tests
run: ./run_behat_tests.sh && make behat-js-quiet
- name: Upload Behat logs
run: ./bin/upload-textfiles "var/log/behat-reports/*.html"
if: always()