Skip to content

Up deps

Up deps #16

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:10
env:
POSTGRES_PASSWORD: postgres
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.3
- name: Install Bundler
run: gem install bundler
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 16.19.0
- name: Setup the Rails application
env:
RAILS_ENV: test
run: |
sudo apt-get -yqq install libpq-dev build-essential
bundle install --no-deployment --jobs 4 --retry 3
cp config/database.github.yml config/database.yml
bundle exec rails db:create
bundle exec rails db:migrate
yarn --frozen-lockfile
- name: Run unit tests
run: bundle exec rails test
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
- name: Publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}