Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to GitHub Actions #14

Merged
merged 1 commit into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/ci/postgresql-cfg/01_overrides.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wal_level = 'logical'
max_worker_processes = 10
max_replication_slots = 10
max_wal_senders = 10
53 changes: 53 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on: [push, pull_request]

jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
services:
postgres:
image: manageiq/postgresql:10
env:
POSTGRESQL_USER: root
POSTGRESQL_PASSWORD: smartvm
POSTGRESQL_DATABASE: vmdb_production
options: >-
--name postgres
--volume /tmp/postgresql-cfg/:/opt/app-root/src/postgresql-cfg/
--health-cmd pg_isready
--health-interval 2s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Override postgres settings
run: |
sudo chown -R $(id -u):$(id -g) /tmp/postgresql-cfg
cp -rf .github/ci/postgresql-cfg/* /tmp/postgresql-cfg
/usr/bin/docker run --rm -v "/var/run/docker.sock":"/var/run/docker.sock" docker restart postgres
until [ "`/usr/bin/docker inspect -f {{.State.Health.Status}} postgres`" == "healthy" ]; do sleep 0.5; done
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '2.7' }}
name: Report code coverage
continue-on-error: true
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
--require spec_helper
--format progress
--color
--order random
21 changes: 0 additions & 21 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,7 +1,7 @@
# PG::LogicalReplication

[![Gem Version](https://badge.fury.io/rb/pg-logical_replication.svg)](http://badge.fury.io/rb/pg-logical_replication)
[![Build Status](https://travis-ci.org/ManageIQ/pg-logical_replication.svg?branch=master)](https://travis-ci.org/ManageIQ/pg-logical_replication)
[![CI](https://github.com/ManageIQ/pg-logical_replication/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/pg-logical_replication/actions/workflows/ci.yaml)
[![Maintainability](https://api.codeclimate.com/v1/badges/9967445630b9e8ff2fe5/maintainability)](https://codeclimate.com/github/ManageIQ/pg-logical_replication/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/9967445630b9e8ff2fe5/test_coverage)](https://codeclimate.com/github/ManageIQ/pg-logical_replication/test_coverage)
[![Security](https://hakiri.io/github/ManageIQ/pg-logical_replication/master.svg)](https://hakiri.io/github/ManageIQ/pg-logical_replication/master)
Expand Down
7 changes: 0 additions & 7 deletions ci/before_install.sh

This file was deleted.

2 changes: 1 addition & 1 deletion pg-logical_replication.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ This gem provides a class with methods which map directly to the PostgreSQL DSL
spec.add_development_dependency "manageiq-style"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "simplecov"
spec.add_development_dependency "simplecov", ">= 0.21.2"
end