Commit b8a85850 authored by Jonne Haß's avatar Jonne Haß
Browse files

Migrate from Travis to Github Actions

closes #8178
parent d0eb711c
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 }}
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}"
# diaspora\*
### A privacy-aware, distributed, open source social network
**master:** [![Build Status master](https://secure.travis-ci.org/diaspora/diaspora.svg?branch=master)](http://travis-ci.org/diaspora/diaspora)
**next-minor:** [![Build Status next-minor](https://secure.travis-ci.org/diaspora/diaspora.svg?branch=next-minor)](http://travis-ci.org/diaspora/diaspora)
[![Coverage Status next-minor](https://coveralls.io/repos/github/diaspora/diaspora/badge.svg?branch=next-minor)](https://coveralls.io/github/diaspora/diaspora?branch=next-minor)|
**develop:** [![Build Status develop](https://secure.travis-ci.org/diaspora/diaspora.svg?branch=develop)](http://travis-ci.org/diaspora/diaspora)
[![Coverage Status develop](https://coveralls.io/repos/github/diaspora/diaspora/badge.svg?branch=develop)](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
......
# 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]
task prepare_db: %w[db:create db:migrate]
task prepare: %w[prepare_db assets:generate_error_pages]
desc "Run everyhting except cucumber"
task other: %w[prepare tests:generate_fixtures spec jasmine:ci]
desc "Run everyhting except cucumber"
task other: %w[prepare tests:generate_fixtures spec jasmine:ci]
desc "Run cucumber"
task cucumber: %w[prepare rake:cucumber]
end
desc "Run cucumber"
task cucumber: %w[prepare rake:cucumber]
end
if defined?(RSpec)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment