Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Merge pull request #56 from TwilioDevEd/fix-deprecated-alice #39

Merge pull request #56 from TwilioDevEd/fix-deprecated-alice

Merge pull request #56 from TwilioDevEd/fix-deprecated-alice #39

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install PostgreSQL Client
run: sudo apt-get -yqq install libpq-dev
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: false
ruby-version: '3.0'
- name: Install gems
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.15.4
- name: Find yarn cache location
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: JS package cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: |
yarn install --pure-lockfile
- name: Build App
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
run: bundle exec rails db:setup
- name: Run tests
run: bundle exec rails test
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
RAILS_ENV: test