-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (74 loc) · 1.98 KB
/
end2end.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
name: End 2 End Testing
on: [push, pull_request]
jobs:
frontend:
runs-on: ubuntu-latest
env:
TOOLCHAIN_PATH: 'toolchain'
services:
nginx:
image: nginx
ports:
- 8888:80
volumes:
- ${{ github.workspace }}/public:/usr/share/nginx/html:ro
options: --name nginx
hub:
image: selenium/hub:3.14.0-gallium
ports:
- "4444:4444"
firefox:
image: selenium/node-firefox:3.14.0-gallium
volumes:
- /dev/shm:/dev/shm
env:
HUB_HOST: hub
chrome:
image: selenium/node-chrome:3.14.0-gallium
volumes:
- /dev/shm:/dev/shm
env:
HUB_HOST: hub
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: true
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Extract build name
shell: bash
run: echo "::set-output name=build_name::$(bash .scripts/extract_build_name.sh)"
id: extract
- name: "Setup ruby 2.7"
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.8
bundler-cache: false
- name: Bundle install
run: |
gem install bundler:2.4.21
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Build docs
run: |
bundle exec rake docs:all
mv /tmp/build/html public/
ls -al public/
env:
SKIP_RAKE_TEST: 'true'
# Restart because mounted folder only exists NOW
- name: Restart nginx
uses: docker://docker
with:
args: docker restart nginx
- name: Run end2end tests
run: echo "Run end2end tests here"
# run: bundle exec rake selenium:test
- name: Dump Docker logs
if: always()
run: docker logs $(docker ps --quiet --filter "name=nginx")