-
Notifications
You must be signed in to change notification settings - Fork 16
146 lines (143 loc) · 5.27 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: RSpec
on: [pull_request]
jobs:
example_spec_legacy:
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.4.10
- 2.5.9
- 2.6.10
- 2.7.8
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/example_spec.rb
env:
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright
timeout-minutes: 3
- run: bundle exec rspec spec/feature/ --exclude-pattern "spec/feature/example_spec.rb"
env:
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright
timeout-minutes: 3
example_spec:
strategy:
fail-fast: false
matrix:
ruby_version:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
name: (${{ matrix.ruby_version }}) Example
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- uses: actions/setup-node@v1
with:
node-version: 20
- 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/example_spec.rb
env:
PLAYWRIGHT_CLI_EXECUTABLE_PATH: ./node_modules/.bin/playwright
timeout-minutes: 3
- run: bundle exec rspec spec/feature/ --exclude-pattern "spec/feature/example_spec.rb"
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@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- uses: actions/setup-node@v1
with:
node-version: 20
- 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@v4
- 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.3
bundler-cache: true
- uses: actions/setup-node@v1
with:
node-version: 20
- 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