Skip to content

Commit 0faed4c

Browse files
committed
Update jasmine rake task and gh action
We don't get a jasmine rake task so need to create one in the Rakefile. jasmine-browser-runner also expects chrome to be installed so this adds an action to set it up. The 'setup-chrome' action defaults to using the latest version so it doesn't need to be specified. We use chrome and not chromedriver, to match the expected use for jasmine-browser-runner: https://github.com/jasmine/jasmine-browser-runner/blob/main/release_notes/2.3.0.md
1 parent ab92c8d commit 0faed4c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/test.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ jobs:
3131
ruby-version: ${{ matrix.ruby }}
3232
bundler-cache: true
3333

34+
- uses: browser-actions/setup-chrome@v1
35+
3436
- name: Run tests
3537
run: bundle exec rake

Rakefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ require "jasmine"
44

55
RSpec::Core::RakeTask.new(:spec)
66

7-
load "jasmine/tasks/jasmine.rake"
7+
namespace :jasmine do
8+
desc "Test JavaScript with headless browser"
9+
task :ci do
10+
sh "npm test"
11+
end
12+
desc "Test JavaScript in browser"
13+
task :server do
14+
sh "npm run test-server"
15+
end
16+
end
817

918
desc "Lint Ruby and JavaScript"
1019
task :lint do

0 commit comments

Comments
 (0)