File tree 7 files changed +32
-72
lines changed
7 files changed +32
-72
lines changed Original file line number Diff line number Diff line change 21
21
- " ~> 4.0"
22
22
steps :
23
23
- name : Checkout Repository
24
- uses : actions/checkout@v2
24
+ uses : actions/checkout@v4
25
25
- name : " Set up Ruby ${{ matrix.ruby_version }}"
26
26
uses : ruby/setup-ruby@v1
27
27
with :
28
28
ruby-version : ${{ matrix.ruby_version }}
29
29
bundler-cache : true
30
+ - name : Unit Tests
31
+ run : bundle exec rspec
32
+
33
+ node :
34
+ name : " Test Frontend (Node ${{ matrix.node_version }})"
35
+ runs-on : " ubuntu-latest"
36
+ strategy :
37
+ fail-fast : false
38
+ matrix :
39
+ node_version : ["12"]
40
+ steps :
41
+ - name : Checkout Repository
42
+ uses : actions/checkout@v4
43
+ - name : " Set up Node ${{ matrix.node_version }}"
44
+ uses : actions/setup-node@v2
45
+ with :
46
+ node-version : ${{ matrix.node_version }}
47
+ cache : " yarn"
48
+ - name : Install Dependencies
49
+ run : yarn install
50
+ - name : Build frontend and run tests
51
+ run : bash script/build
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 27
27
sleep 3
28
28
end
29
29
30
- after { Open3 . capture2e ( *stop_command ) }
30
+ after { Open3 . capture2e ( *stop_command ) } unless ENV [ "GITHUB_ACTION" ]
31
31
32
32
context "Jekyll site" do
33
33
let ( :path ) { "/" }
Original file line number Diff line number Diff line change 16
16
sleep 3
17
17
end
18
18
19
- after { Open3 . capture2e ( *stop_command ) }
19
+ after { Open3 . capture2e ( *stop_command ) } unless ENV [ "GITHUB_ACTION" ]
20
20
21
21
context "Jekyll site" do
22
22
let ( :path ) { "/" }
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def app
31
31
it "gets the index" do
32
32
get "/data"
33
33
expect ( last_response ) . to be_ok
34
- expect ( last_response_parsed [ 2 ] ) . to eql ( base_response )
34
+ expect ( last_response_parsed . find { | file | file [ "slug" ] == "data_file" } ) . to eql ( base_response )
35
35
end
36
36
37
37
it "gets an individual data file" do
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ def app
57
57
get "/theme/_layouts"
58
58
expect ( last_response ) . to be_ok
59
59
expect ( last_response_parsed [ "name" ] ) . to eq ( "_layouts" )
60
- expect ( last_response_parsed [ "entries" ] . first ) . to eq ( expected )
60
+ expect (
61
+ last_response_parsed [ "entries" ] . find { |layout | layout [ "name" ] == "default.html" }
62
+ ) . to eq ( expected )
61
63
end
62
64
63
65
it "returns subdirectories" do
@@ -69,7 +71,9 @@ def app
69
71
}
70
72
get "/theme/assets/images"
71
73
expect ( last_response ) . to be_ok
72
- expect ( last_response_parsed [ "entries" ] . first ) . to eq ( expected )
74
+ expect (
75
+ last_response_parsed [ "entries" ] . find { |img | img [ "name" ] == "icon-dark.png" }
76
+ ) . to eq ( expected )
73
77
end
74
78
end
75
79
You can’t perform that action at this time.
0 commit comments