Skip to content

Commit

Permalink
create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vczb committed May 15, 2021
1 parent 52510f6 commit 280f948
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ci

on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_USER: gamification
POSTGRES_PASSWORD: gamification
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v2

- uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Install PostgreSQL client
run: |
sudo apt-get -yqq install libpq-dev
- name: Build App
env:
PGHOST: localhost
PGUSER: gamification
PGPASSWORD: gamification
RAILS_ENV: test
run: |
bin/rails db:setup
- name: Run Tests
env:
PGHOST: localhost
PGUSER: gamification
PGPASSWORD: gamification
RAILS_ENV: test
run: |
bundle exec rspec

0 comments on commit 280f948

Please sign in to comment.