-
Notifications
You must be signed in to change notification settings - Fork 244
55 lines (53 loc) · 1.69 KB
/
Copy pathchrome.yml
File metadata and controls
55 lines (53 loc) · 1.69 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
name: Chrome Tests
on:
- workflow_dispatch
- push
- pull_request
jobs:
local-tests:
name: Local Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
ruby: [ 3.0, 3.2 ]
steps:
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Fluxbox
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -y install fluxbox
- name: Start XVFB
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 -screen 0 1920x1280x24 > /dev/null 2>&1 &
- name: Start Fluxbox
if: matrix.os == 'ubuntu-latest'
run: fluxbox -display :99 &
- name: Set Windows resolution
if: matrix.os == 'windows-latest'
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
- name: Set Mac resolution
if: ${{ matrix.os == 'macos-11' }}
run: |
system_profiler SPDisplaysDataType | grep Resolution
"/Library/Application Support/VMware Tools/vmware-resolutionSet" 2560 1440
system_profiler SPDisplaysDataType | grep Resolution
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install gems
run: bundle install
- name: Remove driver directories Windows
if: matrix.os == 'windows-latest'
run: |
rm "$env:ChromeWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows-latest'
run: |
sudo rm -rf $CHROMEWEBDRIVER
- name: Run tests
run: bundle exec rake spec:chrome
env:
DISPLAY: :99.0