Skip to content

Commit 70e3bd5

Browse files
committed
Update Actions, add Ubuntu & macOS
test/helper.rb - Add SQLite3::SQLITE_VERSION to top of test log, set $VERBOSE = nil in CI
1 parent 6fc5073 commit 70e3bd5

3 files changed

Lines changed: 61 additions & 27 deletions

File tree

.github/workflows/sqlite3-ruby.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
CI:
7+
timeout-minutes: 10
8+
name: >-
9+
CI ${{ matrix.os }} ${{ matrix.ruby }}
10+
runs-on: ${{ matrix.os }}-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu, macos ]
15+
ruby: [ head, 2.7, 2.6, 2.5, 2.4, 2.3, 2.2 ]
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: load Ruby and dependencies
19+
uses: MSP-Greg/setup-ruby-pkgs@v1
20+
with:
21+
ruby-version: ${{ matrix.ruby }}
22+
apt-get: libsqlite3-dev
23+
24+
- name: install
25+
run: bundle install --jobs 4 --retry 3
26+
- name: compile
27+
run: bundle exec rake compile
28+
- name: test
29+
run: bundle exec rake test
30+
31+
Win:
32+
timeout-minutes: 10
33+
name: >-
34+
CI ${{ matrix.os }} ${{ matrix.ruby }}
35+
runs-on: ${{ matrix.os }}-latest
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
os: [windows ]
40+
ruby: [ mingw, 2.7, 2.6, 2.5, 2.4 ]
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: load Ruby and sqlite3
44+
uses: MSP-Greg/setup-ruby-pkgs@v1
45+
with:
46+
ruby-version: ${{ matrix.ruby }}
47+
mingw: sqlite3
48+
49+
- name: install
50+
run: bundle install --jobs 4 --retry 3
51+
- name: compile msys2
52+
run: bundle exec rake compile:msys2
53+
- name: test
54+
run: bundle exec rake test

.github/workflows/windows.yml

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

test/helper.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
require 'sqlite3'
22
require 'minitest/autorun'
33

4+
if ENV['GITHUB_ACTIONS'] == 'true' || ENV['CI']
5+
$VERBOSE = nil
6+
puts "\nSQLite3 Version: #{SQLite3::SQLITE_VERSION} $VERBOSE = nil", ""
7+
else
8+
puts "\nSQLite3 Version: #{SQLite3::SQLITE_VERSION}", ""
9+
end
10+
411
unless RUBY_VERSION >= "1.9"
512
require 'iconv'
613
end

0 commit comments

Comments
 (0)