File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1313
1414jobs :
1515 tests :
16- name : General Ruby on Rails tests
16+ name : Ruby on Rails tests
1717 runs-on : ubuntu-latest
1818
1919 strategy :
2020 matrix :
2121 ruby_version : [3.1, 3.2]
22+ test_type : [test, test:system]
2223
2324 services :
2425 mysql :
4041 - name : Setup dependencies
4142 run : |
4243 sudo apt-get -qq update
43- sudo apt-get -yqq install libmariadb-dev libmagickwand-dev
44+ sudo apt-get -yqq install libmariadb-dev libmagickwand-dev firefox-esr
4445 - name : Setup Ruby
4546 uses : ruby/setup-ruby@v1
4647 with :
5455 bundle exec rails db:schema:load
5556 bundle exec rails db:migrate
5657 bundle exec rails test:prepare
57- - run : bundle exec rails test
58+ - run : bundle exec rails ${{ matrix.test_type }}
59+ - name : Upload screenshots
60+ if : ${{ matrix.test_type == 'test:system' }}
61+ uses : actions/upload-artifact@v4
62+ with :
63+ name : screenshots-${{ matrix.ruby_version }}
64+ path : ~/tmp/screenshots
65+ if-no-files-found : ignore
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ class PostSystemTest < ApplicationSystemTestCase
77 # Create
88 # -------------------------------------------------------
99
10+ test 'dummy test for screenshot uploading' do
11+ visit root_url
12+ take_screenshot
13+ end
14+
1015 test 'Not-signed in user cannot create a post' do
1116 visit root_url
1217 click_on 'Create Post'
You can’t perform that action at this time.
0 commit comments