/
config.yml
94 lines (92 loc) · 2.86 KB
/
config.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
version: 2
defaults: &defaults
docker:
- image: canonicalwebteam/dev:v1.6.7
jobs:
test-site:
<<: *defaults
steps:
- checkout
- run:
name: Install dependencies
command: yarn && pip3 install -r requirements.txt
- run:
name: Build the site resources
command: yarn run build
- run:
name: Run the site server
command: ./entrypoint 0.0.0.0:80
background: true
- run:
name: Check site is accessible
command: sleep 3 && curl --head --fail --retry-delay 5 --retry 10 --retry-connrefused http://localhost
linkchecker:
<<: *defaults
steps:
- checkout
- run:
name: Install Linkchecker
command: apt-get install -y linkchecker
- run:
name: Yarn install
command: yarn install
- run:
name: Yarn build
command: yarn build
- run:
name: Install dependencies
command: pip3 install -r requirements.txt
- run:
name: Start development server
command: ./entrypoint 0.0.0.0:80
background: true
- run:
name: Wait for development server
command: sleep 5
- run:
name: Check internal links
command: linkchecker --ignore-url /search http://localhost
lint-scss:
<<: *defaults
steps:
- checkout
- run:
name: Install dependencies
command: yarn
- run:
name: Lint sass
command: yarn lint-scss
percy:
<<: *defaults
steps:
- checkout
- run:
# https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix
name: Install puppeteer dependencies
command: |
apt-get update
apt-get -yq install gconf-service libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxss1 libxtst6 libappindicator1 libnss3 libasound2 libatk1.0-0 libc6 ca-certificates fonts-liberation lsb-release xdg-utils wget
- run:
name: Install dependencies
command: yarn && pip3 install -r requirements.txt
- run:
name: Build the site resources
command: yarn run build
- run:
name: Run the site server
command: ./entrypoint 0.0.0.0:80
background: true
- run:
name: Wait for development server
command: sleep 5
- run:
name: Snapshot screenshots
command: yarn percy
workflows:
version: 2
build:
jobs:
- test-site
- lint-scss
- linkchecker
- percy