diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5cd5a75..bb5d037 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,35 +6,36 @@ jobs: build: runs-on: ubuntu-latest + container: + image: ruby:2.6.5 + services: postgres: image: postgres:12 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v1 - - name: Set up Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.3 - - name: Set up reporter run: | curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter ./cc-test-reporter before-build - - name: Run tests + - name: Install dependencies run: | - sudo apt-get install libpq-dev + apt-get -yqq install libpq-dev gem install bundler bundle install --jobs 4 --retry 3 - bundle exec rake + + - name: Run tests + run: bundle exec rake env: - DATABASE_URL: postgres://postgres@localhost/postgres + APP_ENV: test + DATABASE_URL: postgres://postgres@postgres/postgres - name: Publish image uses: elgohr/Publish-Docker-Github-Action@master diff --git a/.ruby-version b/.ruby-version index ec1cf33..57cf282 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.3 +2.6.5 diff --git a/Dockerfile b/Dockerfile index d30df73..5361869 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6.3 +FROM ruby:2.6.5 RUN mkdir /app WORKDIR /app diff --git a/Gemfile b/Gemfile index cf50be3..8390435 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'http://rubygems.org' -ruby '2.6.3' +ruby '2.6.5' gem 'money' gem 'oj' diff --git a/Gemfile.lock b/Gemfile.lock index ac23ac5..d40ea9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,7 +120,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 2.6.3p62 + ruby 2.6.5p114 BUNDLED WITH 2.0.2