Skip to content

Commit

Permalink
Use GitHub Actions insted of Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
paroga committed Sep 5, 2020
1 parent c6250de commit ca76347
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 24 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Ruby

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

services:
mariadb:
image: mariadb
env:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379

steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup chromedriver
uses: nanasess/setup-chromedriver@v1.0.1
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Initialize stock configuration
run: bundle exec rake foodsoft:setup:stock_config
- name: Load database schema
run: bundle exec rake db:schema:load
env:
RAILS_ENV: test
DATABASE_URL: mysql2://user:password@127.0.0.1/test
- name: Run tests
run: bundle exec rake spec
env:
RAILS_ENV: test
DATABASE_URL: mysql2://user:password@127.0.0.1/test
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

0 comments on commit ca76347

Please sign in to comment.