-
Notifications
You must be signed in to change notification settings - Fork 16
108 lines (106 loc) · 3.83 KB
/
rspec.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: RSpec
on: [pull_request]
jobs:
example_spec:
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.4.10
- 2.5.9
- 2.6.10
- '2.7'
- '3.0'
- '3.1'
name: (${{ matrix.ruby_version }}) Example
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: microsoft/playwright-github-action@v1
- name: setup playwright via npm install
run: |
export PLAYWRIGHT_CLI_VERSION=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip')
npm install playwright@${PLAYWRIGHT_CLI_VERSION} || npm install playwright@next
./node_modules/.bin/playwright install
- run: bundle exec rspec spec/feature/
env:
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright
timeout-minutes: 3
playwright_driver_spec:
needs: example_spec
strategy:
fail-fast: false
matrix:
browser: [chromium, webkit]
name: (${{ matrix.browser }}) Playwright Driver
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: microsoft/playwright-github-action@v1
- name: setup playwright via npm install
run: |
export PLAYWRIGHT_CLI_VERSION=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip')
npm install playwright@${PLAYWRIGHT_CLI_VERSION} || npm install playwright@next
./node_modules/.bin/playwright install
- run: bundle exec rspec spec/capybara/
env:
BROWSER: ${{ matrix.browser }}
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright
timeout-minutes: 25
playwright_driver_spec_firefox:
needs: example_spec
name: (firefox) Playwright Driver
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: setup Allure
run: |
wget https://github.com/allure-framework/allure2/releases/download/2.14.0/allure_2.14.0-1_all.deb
sudo dpkg -i allure_2.14.0-1_all.deb
rm allure_2.14.0-1_all.deb
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: microsoft/playwright-github-action@v1
- name: setup playwright via npm install
run: |
export PLAYWRIGHT_CLI_VERSION=$(bundle exec ruby -e 'require "playwright"; puts Playwright::COMPATIBLE_PLAYWRIGHT_VERSION.strip')
npm install playwright@${PLAYWRIGHT_CLI_VERSION} || npm install playwright@next
./node_modules/.bin/playwright install
- run: bundle exec rspec spec/capybara/ --format AllureRspecFormatter --format documentation --failure-exit-code 0
env:
BROWSER: firefox
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright
timeout-minutes: 45
- run: bundle exec rspec spec/capybara/ --format AllureRspecFormatter --format documentation --only-failures
env:
BROWSER: firefox
DEBUG: 1
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright
timeout-minutes: 15
- run: allure generate reports/allure-results
- uses: actions/upload-artifact@v2
with:
name: allure-report
path: allure-report