This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
Merge branch 'master' of github.com:excid3/jumpstart #188
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: test_app_production | |
POSTGRES_USER: test_app | |
POSTGRES_PASSWORD: password | |
ports: ['5432:5432'] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mysql: | |
image: mysql:8 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: test_app_production | |
MYSQL_USER: test_app | |
MYSQL_PASSWORD: password | |
ports: | |
- 3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: Install dependencies | |
run: | | |
npm install -g npm | |
sudo apt-get -yqq install libsqlite3-dev libpq-dev libmysqlclient-dev | |
gem install rails | |
# Clean up git repo so the new rails template doesn't conflict | |
- name: Remove git repo | |
run: | | |
rm -rf .git | |
- name: Run tests | |
env: | |
TEST_APP_DATABASE_PASSWORD: password | |
run: | | |
rake |