Skip to content

Commit 95bfcf5

Browse files
authored
Set up Continuous Integration via GH Actions (#44)
Additionally disable closing of opened pipes on GitHub Actions
1 parent 58bc957 commit 95bfcf5

File tree

7 files changed

+32
-72
lines changed

7 files changed

+32
-72
lines changed

.github/workflows/ci.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,31 @@ jobs:
2121
- "~> 4.0"
2222
steps:
2323
- name: Checkout Repository
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2525
- name: "Set up Ruby ${{ matrix.ruby_version }}"
2626
uses: ruby/setup-ruby@v1
2727
with:
2828
ruby-version: ${{ matrix.ruby_version }}
2929
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

.travis.yml

-23
This file was deleted.

appveyor.yml

-43
This file was deleted.

spec/jekyll-admin/custom_integration_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
sleep 3
2828
end
2929

30-
after { Open3.capture2e(*stop_command) }
30+
after { Open3.capture2e(*stop_command) } unless ENV["GITHUB_ACTION"]
3131

3232
context "Jekyll site" do
3333
let(:path) { "/" }

spec/jekyll-admin/integration_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
sleep 3
1717
end
1818

19-
after { Open3.capture2e(*stop_command) }
19+
after { Open3.capture2e(*stop_command) } unless ENV["GITHUB_ACTION"]
2020

2121
context "Jekyll site" do
2222
let(:path) { "/" }

spec/jekyll-admin/server/data_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def app
3131
it "gets the index" do
3232
get "/data"
3333
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)
3535
end
3636

3737
it "gets an individual data file" do

spec/jekyll-admin/server/theme_spec.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def app
5757
get "/theme/_layouts"
5858
expect(last_response).to be_ok
5959
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)
6163
end
6264

6365
it "returns subdirectories" do
@@ -69,7 +71,9 @@ def app
6971
}
7072
get "/theme/assets/images"
7173
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)
7377
end
7478
end
7579

0 commit comments

Comments
 (0)