-
-
Notifications
You must be signed in to change notification settings - Fork 227
53 lines (52 loc) · 1.39 KB
/
e2e-test.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
name: E2E Tests
on:
pull_request:
push:
branches:
- main
jobs:
e2e:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04]
password: [root]
node: [20.x]
steps:
- name: Start nginx
run: sudo service nginx start
- name: Updating hosts file
run: 'echo -e "127.0.0.1 cli-testing.ghost.org\n" | sudo tee -a /etc/hosts'
- uses: actions/checkout@v4
with:
path: "cli"
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
cache-dependency-path: cli/yarn.lock
env:
FORCE_COLOR: 0
- name: Start MySQL service
run: sudo systemctl start mysql.service
- name: Prepare CLI
run: |
cd cli
yarn install --frozen-lockfile
sudo yarn link --link-folder /usr/bin/
- name: Setting up Ghost instance
run: |
ghost install \
-d ghost \
--auto \
--no-prompt \
--url http://cli-testing.ghost.org \
--db mysql \
--dbhost 127.0.0.1 \
--dbuser root \
--dbpass ${{ matrix.password }} \
--dbname ghost-mysql
- name: Verifying Installation
run: curl http://cli-testing.ghost.org | grep ghost