Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit 3104721

Browse files
committed
Add Windows and Macos and fix mergify conditions
1 parent aff911f commit 3104721

File tree

2 files changed

+48
-26
lines changed

2 files changed

+48
-26
lines changed

.github/workflows/ruby.yml

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,50 @@ on:
99
jobs:
1010
build:
1111

12-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.platform }}
13+
14+
strategy:
15+
matrix:
16+
platform: [ubuntu-latest, macos-latest, windows-latest]
17+
ruby: [ '2.6.x' ]
1318

1419
steps:
15-
- uses: actions/checkout@v2
16-
- name: Setup System
17-
run: |
18-
sudo apt-get update
19-
sudo apt-get install libsqlite3-dev
20-
- name: Set up Ruby 2.6
21-
uses: actions/setup-ruby@v1
22-
with:
23-
ruby-version: 2.6.x
24-
- name: Build and test with minitests
25-
run: |
26-
gem install bundler
27-
bundle install --jobs 4 --retry 3
28-
- name: Test
29-
run: bundle exec rails test
30-
env:
31-
TWILIO_ACCOUNT_SID: YOUR-TWILIO-ACCOUNT-SID
32-
TWILIO_AUTH_TOKEN: YOUR-TWILIO-AUTH-TOKEN
33-
VERIFICATION_SID: YOUR-VERIFICATION-SID
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
- name: Install SQLite (Ubuntu)
23+
if: runner.os == 'Linux'
24+
run: sudo apt-get update && sudo apt-get install -yqq libsqlite3-dev
25+
- name: Install SQLite (OSX)
26+
if: runner.os == 'macOs'
27+
run: brew install sqlite3
28+
- name: Install SQLite (Windows)
29+
if: runner.os == 'Windows'
30+
uses: crazy-max/ghaction-chocolatey@v1
31+
with:
32+
args: install sqlite
33+
- name: Setup Ruby ${{ matrix.ruby }}
34+
uses: actions/setup-ruby@v1
35+
with:
36+
ruby-version: ${{ matrix.ruby }}
37+
- name: Ruby gem cache
38+
uses: actions/cache@v1
39+
with:
40+
path: vendor/bundle
41+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
42+
restore-keys: |
43+
${{ runner.os }}-gems-
44+
- name: Install SQLite gem (Windows)
45+
if: runner.os == 'Windows'
46+
run: gem install sqlite3 --platform=ruby -- --with-sqlite3-include=/c:/ProgramData/ProgramData/lib/SQLite/tools
47+
- name: Install gems
48+
run: |
49+
gem install bundler
50+
bundle config path vendor/bundle
51+
bundle install --jobs 4 --retry 3
52+
- name: Run tests
53+
run: |
54+
cp .env.example .env
55+
bundle exec rails db:migrate RAILS_ENV=test
56+
bundle exec rspec
57+
env:
58+
RAILS_ENV: test

.mergify.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ pull_request_rules:
22
- name: automatic merge for Dependabot pull requests
33
conditions:
44
- author=dependabot-preview[bot]
5-
- status-success=build (macos-latest, 10)
6-
- status-success=build (macos-latest, 12)
7-
- status-success=build (windows-latest, 10)
8-
- status-success=build (windows-latest, 12)
9-
- status-success=build (ubuntu-latest, 10)
10-
- status-success=build (ubuntu-latest, 12)
5+
- status-success=build (ubuntu-latest, 2.6.x)
6+
- status-success=build (macos-latest, 2.6.x)
7+
- status-success=build (windows-latest, 2.6.x)
118
actions:
129
merge:
1310
method: squash

0 commit comments

Comments
 (0)