Hakan Ensari 2019-12-24 14:47:54 +00:00
parent af17d699dd
commit 2ef2c23aee
5 changed files with 15 additions and 14 deletions

View File

@ -6,35 +6,36 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: ruby:2.6.5
services: services:
postgres: postgres:
image: postgres:12 image: postgres:12
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports: ports:
- 5432:5432 - 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.3
- name: Set up reporter - name: Set up reporter
run: | run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter chmod +x ./cc-test-reporter
./cc-test-reporter before-build ./cc-test-reporter before-build
- name: Run tests - name: Install dependencies
run: | run: |
sudo apt-get install libpq-dev apt-get -yqq install libpq-dev
gem install bundler gem install bundler
bundle install --jobs 4 --retry 3 bundle install --jobs 4 --retry 3
bundle exec rake
- name: Run tests
run: bundle exec rake
env: env:
DATABASE_URL: postgres://postgres@localhost/postgres APP_ENV: test
DATABASE_URL: postgres://postgres@postgres/postgres
- name: Publish image - name: Publish image
uses: elgohr/Publish-Docker-Github-Action@master uses: elgohr/Publish-Docker-Github-Action@master

View File

@ -1 +1 @@
2.6.3 2.6.5

View File

@ -1,4 +1,4 @@
FROM ruby:2.6.3 FROM ruby:2.6.5
RUN mkdir /app RUN mkdir /app
WORKDIR /app WORKDIR /app

View File

@ -2,7 +2,7 @@
source 'http://rubygems.org' source 'http://rubygems.org'
ruby '2.6.3' ruby '2.6.5'
gem 'money' gem 'money'
gem 'oj' gem 'oj'

View File

@ -120,7 +120,7 @@ DEPENDENCIES
webmock webmock
RUBY VERSION RUBY VERSION
ruby 2.6.3p62 ruby 2.6.5p114
BUNDLED WITH BUNDLED WITH
2.0.2 2.0.2