Skip to content

Commit

Permalink
Set up Continuous Integration via GH Actions (#44)
Browse files Browse the repository at this point in the history
Additionally disable closing of opened pipes on GitHub Actions
  • Loading branch information
ashmaroli authored Dec 20, 2024
1 parent 58bc957 commit 95bfcf5
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 72 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,31 @@ jobs:
- "~> 4.0"
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Unit Tests
run: bundle exec rspec

node:
name: "Test Frontend (Node ${{ matrix.node_version }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
node_version: ["12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: "Set up Node ${{ matrix.node_version }}"
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
cache: "yarn"
- name: Install Dependencies
run: yarn install
- name: Build frontend and run tests
run: bash script/build
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

43 changes: 0 additions & 43 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion spec/jekyll-admin/custom_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
sleep 3
end

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

context "Jekyll site" do
let(:path) { "/" }
Expand Down
2 changes: 1 addition & 1 deletion spec/jekyll-admin/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
sleep 3
end

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

context "Jekyll site" do
let(:path) { "/" }
Expand Down
2 changes: 1 addition & 1 deletion spec/jekyll-admin/server/data_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def app
it "gets the index" do
get "/data"
expect(last_response).to be_ok
expect(last_response_parsed[2]).to eql(base_response)
expect(last_response_parsed.find { |file| file["slug"] == "data_file" }).to eql(base_response)
end

it "gets an individual data file" do
Expand Down
8 changes: 6 additions & 2 deletions spec/jekyll-admin/server/theme_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def app
get "/theme/_layouts"
expect(last_response).to be_ok
expect(last_response_parsed["name"]).to eq("_layouts")
expect(last_response_parsed["entries"].first).to eq(expected)
expect(
last_response_parsed["entries"].find { |layout| layout["name"] == "default.html" }
).to eq(expected)
end

it "returns subdirectories" do
Expand All @@ -69,7 +71,9 @@ def app
}
get "/theme/assets/images"
expect(last_response).to be_ok
expect(last_response_parsed["entries"].first).to eq(expected)
expect(
last_response_parsed["entries"].find { |img| img["name"] == "icon-dark.png" }
).to eq(expected)
end
end

Expand Down

0 comments on commit 95bfcf5

Please sign in to comment.