Skip to content

Commit 2288eb4

Browse files
committed
Add CI run on Github-Actions
.. using the oldest and newest supported ruby version.
1 parent 939045d commit 2288eb4

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: ci
2+
on:
3+
push:
4+
pull_request:
5+
6+
jobs:
7+
ci:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ ubuntu, macos, windows ]
12+
ruby: [ '2.5', ruby-head ]
13+
runs-on: ${{ matrix.os }}-latest
14+
env:
15+
PGSERVICE: postgres
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: ${{ matrix.ruby }}
22+
- uses: ikalnytskyi/action-setup-postgres@v4
23+
24+
- run: bundle install
25+
- run: createdb activestorage_pglo_test
26+
27+
# For some reason the db migrations needs to be executed explicitly on Windows
28+
- name: Copy and run migrations on Windows
29+
if: matrix.os == 'windows'
30+
run: |
31+
ridk exec cp -rv db/migrate test/dummy/db/
32+
rake -f test/dummy/Rakefile active_storage:install db:migrate RAILS_ENV=test
33+
- run: bundle exec rake test

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ gem 'image_processing', '~> 1.2'
1414

1515
# To use a debugger
1616
# gem 'byebug', group: [:development, :test]
17+
18+
# Required on Windows only
19+
gem 'tzinfo-data'

0 commit comments

Comments
 (0)