parent
d0eb711ca0
commit
b8a85850e1
5 changed files with 69 additions and 62 deletions
60
.github/workflows/ci.yml
vendored
Normal file
60
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- next-minor
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby:
|
||||
- 2.6
|
||||
- 2.5
|
||||
db:
|
||||
- mysql
|
||||
- postgresql
|
||||
kind:
|
||||
- cucumber
|
||||
- other
|
||||
env:
|
||||
DB: ${{ matrix.db }}
|
||||
RAILS_ENV: test
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
steps:
|
||||
- name: Install system dependencies
|
||||
run: sudo apt-get install -y libidn11-dev
|
||||
- name: Start MySQL
|
||||
run: sudo systemctl start mysql.service
|
||||
if: matrix.db == 'mysql'
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
- name: Prepare
|
||||
run: script/ci/prepare.sh
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: bundler-${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.db }}-${{ hashFiles('Gemfile.lock') }}
|
||||
- name: Install dependencies
|
||||
run: bundle
|
||||
- name: Run tests
|
||||
run: bin/rake --trace ci:${{ matrix.kind }}
|
||||
50
.travis.yml
50
.travis.yml
|
|
@ -1,50 +0,0 @@
|
|||
language: ruby
|
||||
|
||||
rvm:
|
||||
- 2.6.6
|
||||
- 2.5.8
|
||||
|
||||
env:
|
||||
- DB=postgresql BUILD_TYPE=cucumber
|
||||
- DB=mysql BUILD_TYPE=cucumber
|
||||
- DB=postgresql BUILD_TYPE=other
|
||||
- DB=mysql BUILD_TYPE=other
|
||||
|
||||
sudo: false
|
||||
cache:
|
||||
bundler: true
|
||||
directories:
|
||||
- app/assets/images
|
||||
- tmp/cache/assets
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libidn11-dev
|
||||
- ghostscript
|
||||
|
||||
services:
|
||||
- postgresql
|
||||
- mysql
|
||||
|
||||
branches:
|
||||
only:
|
||||
- 'master'
|
||||
- 'next-minor'
|
||||
- 'develop'
|
||||
|
||||
before_install:
|
||||
- script/ci/prepare.sh
|
||||
- mkdir travis-phantomjs
|
||||
- wget http://cifiles.diasporafoundation.org/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
|
||||
- export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
|
||||
|
||||
script: "bin/rake --trace ci:travis:${BUILD_TYPE}"
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
- secure: YvYkeTAw+5oOl/RaXVwu7JkKGNWPoFosNQRmLvJkBFbWzZ1s5LZD1u3+Qj819bT3lGzJu9pxmJg765IRYrGWmBi4mcAV3dpO6qowVdFTcorf0JsnLw3Kvkga9rrDunsRNr21KTAQqHOO5mKUzw9DtMzd52BiWuZwIj3xcl72gQI=
|
||||
template:
|
||||
- "%{repository_slug}#%{commit} (%{branch} - %{commit_subject}): %{message} %{build_url}"
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
# diaspora\*
|
||||
### A privacy-aware, distributed, open source social network
|
||||
|
||||
**master:** [](http://travis-ci.org/diaspora/diaspora)
|
||||
**next-minor:** [](http://travis-ci.org/diaspora/diaspora)
|
||||
[](https://coveralls.io/github/diaspora/diaspora?branch=next-minor)|
|
||||
**develop:** [](http://travis-ci.org/diaspora/diaspora)
|
||||
[](https://coveralls.io/github/diaspora/diaspora?branch=develop) |
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ postgresql: &postgresql
|
|||
host: "localhost"
|
||||
port: 5432
|
||||
username: "postgres"
|
||||
password: ""
|
||||
password: "postgres"
|
||||
encoding: unicode
|
||||
|
||||
mysql: &mysql
|
||||
|
|
@ -11,7 +11,7 @@ mysql: &mysql
|
|||
host: "localhost"
|
||||
port: 3306
|
||||
username: "root"
|
||||
password: ""
|
||||
password: "root"
|
||||
# socket: /tmp/mysql.sock
|
||||
encoding: utf8mb4
|
||||
collation: utf8mb4_bin
|
||||
|
|
@ -31,6 +31,7 @@ common: &common
|
|||
#### CONFIGURE ABOVE #############################
|
||||
##################################################
|
||||
|
||||
|
||||
# Normally you don't need to touch anything here
|
||||
|
||||
combined: &combined
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :ci do
|
||||
namespace :travis do
|
||||
task prepare_db: %w[db:create db:migrate]
|
||||
task prepare: %w[prepare_db assets:generate_error_pages]
|
||||
|
||||
|
|
@ -11,7 +10,6 @@ namespace :ci do
|
|||
desc "Run cucumber"
|
||||
task cucumber: %w[prepare rake:cucumber]
|
||||
end
|
||||
end
|
||||
|
||||
if defined?(RSpec)
|
||||
namespace :tests do
|
||||
|
|
|
|||
Loading…
Reference in a new issue