-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4231 from benwbrum/4179-github-workflows
4179 - Github workflows
- Loading branch information
Showing
6 changed files
with
80 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
service_name: travis-ci | ||
service_name: github |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: "CI" | ||
on: | ||
pull_request: {} | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_DATABASE: diary_test | ||
MYSQL_ROOT_PASSWORD: password | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
env: | ||
RAILS_ENV: test | ||
MYSQL_ROOT_PASSWORD: password | ||
MYSQL_SOCKET: /tmp/mysql.sock | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.3 | ||
bundler-cache: true | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install -y ghostscript poppler-utils graphviz | ||
bundle install --jobs 4 --retry 3 | ||
- name: Create db | ||
run: bundle exec rake db:create | ||
- name: Migrate | ||
run: bundle exec rake db:migrate | ||
- name: Load fixtures | ||
run: bundle exec rake db:fixtures:load FIXTURES_PATH=spec/fixtures | ||
- name: Run RuboCop | ||
run: bundle exec rubocop | ||
continue-on-error: true | ||
- name: Run tests | ||
uses: coactions/setup-xvfb@v1 | ||
with: | ||
run: bundle exec rspec spec | ||
- name: Run Coveralls | ||
run: bundle exec coveralls push |
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
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
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
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