Skip to content

Commit

Permalink
Use Github Actions over Travis CI
Browse files Browse the repository at this point in the history
Set postgres service settings

Upgrade ruby-version to 2.6.0

Fix issue with MySQL server

Update CI settings

Update README.md

Delete travis.yml
  • Loading branch information
mechanicles committed Aug 5, 2023
1 parent 62039c5 commit d43cad2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 33 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
CC_TEST_REPORTER_ID: 353b5634de390dad574939f59c2ef3798b81f06df548f7bdd11cd8225be484f3
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.0
bundler-cache: true

- name: Install Bundler
run: gem install bundler

- name: Install dependencies
run: bundle install

- name: Set up Code Climate Test Reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- uses: ankane/setup-postgres@v1
with:
database: set_as_primary_test

- uses: ankane/setup-mysql@v1
with:
database: set_as_primary_test
- run: mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

- name: Run tests
run: bundle exec rake

- name: Upload test coverage results to Code Climate
if: always() && ${{ github.ref == 'refs/heads/master' }} # Adjust the branch name if needed
run: ./cc-test-reporter after-build --debug
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SetAsPrimary

[![Build Status](https://travis-ci.org/mechanicles/set_as_primary.svg?branch=master)](https://travis-ci.org/mechanicles/set_as_primary)
[![Build Status](https://github.com/mechanicles/set_as_primary/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/mechanicles/set_as_primary/actions)
[![Maintainability](https://api.codeclimate.com/v1/badges/9aa764138b14b87c8fe1/maintainability)](https://codeclimate.com/github/mechanicles/set_as_primary/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/9aa764138b14b87c8fe1/test_coverage)](https://codeclimate.com/github/mechanicles/set_as_primary/test_coverage)

Expand Down

0 comments on commit d43cad2

Please sign in to comment.