Skip to content

Commit f35e392

Browse files
authored
Set up Continuous Integration via GH Actions (#678)
* Set up Continuous Integration via GH Actions * Disable closing of opened pipes on GitHub Actions * Delete TravisCI configuration
1 parent 1e87661 commit f35e392

File tree

3 files changed

+56
-33
lines changed

3 files changed

+56
-33
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
ruby:
11+
name: "Test Backend (Jekyll ${{ matrix.jekyll_version }}, Ruby ${{ matrix.ruby_version }})"
12+
runs-on: "ubuntu-latest"
13+
env:
14+
JEKYLL_VERSION: ${{ matrix.jekyll_version }}
15+
JEKYLL_LOG_LEVEL: warn
16+
RACK_ENV: test
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
ruby_version: ["2.7"]
21+
jekyll_version:
22+
- "~> 3.9"
23+
- "~> 4.0"
24+
steps:
25+
- name: Checkout Repository
26+
uses: actions/checkout@v2
27+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.ruby_version }}
31+
bundler-cache: true
32+
- name: Unit Tests
33+
run: bundle exec rspec --format documentation --force-color --backtrace
34+
35+
node:
36+
name: "Test Frontend (Node ${{ matrix.node_version }})"
37+
runs-on: "ubuntu-latest"
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
node_version: ["12"]
42+
steps:
43+
- name: Checkout Repository
44+
uses: actions/checkout@v2
45+
- name: "Set up Node ${{ matrix.node_version }}"
46+
uses: actions/setup-node@v2
47+
with:
48+
node-version: ${{ matrix.node_version }}
49+
cache: "yarn"
50+
- name: Install Dependencies
51+
run: yarn install
52+
- name: Run tests and build frontend
53+
run: bash script/build

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

spec/jekyll-admin/integration_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
sleep 3
1717
end
1818

19-
after { Open3.capture2e(*stop_command) }
19+
unless ENV["GITHUB_ACTION"]
20+
after { Open3.capture2e(*stop_command) }
21+
end
2022

2123
context "Jekyll site" do
2224
let(:path) { "/" }

0 commit comments

Comments
 (0)