switch ci from travis to actions
This commit is contained in:
parent
ac5404dbd8
commit
afa973c67b
|
@ -5,14 +5,14 @@ echo "Running sinatra tests..."
|
|||
bundle exec rake
|
||||
|
||||
echo "Running sinatra-contrib tests..."
|
||||
export BUILDIR=$TRAVIS_BUILD_DIR/sinatra-contrib
|
||||
export BUILDIR=$GITHUB_WORKSPACE/sinatra-contrib
|
||||
export BUNDLE_GEMFILE=$BUILDIR/Gemfile
|
||||
cd $BUILDIR
|
||||
bundle install --jobs=3 --retry=3
|
||||
bundle exec rake
|
||||
|
||||
echo "Running rack-protection tests..."
|
||||
export BUILDIR=$TRAVIS_BUILD_DIR/rack-protection
|
||||
export BUILDIR=$GITHUB_WORKSPACE/rack-protection
|
||||
export BUNDLE_GEMFILE=$BUILDIR/Gemfile
|
||||
cd $BUILDIR
|
||||
bundle install --jobs=3 --retry=3
|
|
@ -0,0 +1,38 @@
|
|||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
||||
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
||||
|
||||
name: Testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test with Ruby-${{ matrix.ruby }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
||||
# TODO: Add jruby if something like allow_failures will be implemented on Actions.
|
||||
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', head]
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: true
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -y pandoc nodejs pkg-config libxml2-dev libxslt-dev
|
||||
- name: Run tests
|
||||
run: ./.actions.sh
|
||||
|
||||
# TODO(zzak, rkh): Add slack notification.
|
34
.travis.yml
34
.travis.yml
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
language: ruby
|
||||
|
||||
dist: xenial
|
||||
|
||||
before_install:
|
||||
- gem install bundler
|
||||
- export CXX="g++-4.8"
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
- pandoc
|
||||
rvm:
|
||||
- 2.3.8
|
||||
- 2.4.10
|
||||
- 2.5.8
|
||||
- 2.6.6
|
||||
- 2.7.1
|
||||
- 3.0.0
|
||||
- jruby-9.2.16.0
|
||||
|
||||
script: ./.travis.sh
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- rvm: jruby-9.2.16.0
|
||||
|
||||
notifications:
|
||||
slack:
|
||||
secure: 6E+GuZId5GcVLgiOKZnE9ZAnJTa+K2Fxqb0KfrECtskviylcPF1OmX36+y7xGUS0P0pGNyWQThe0zCBMpszno/KbvUdIs6jXbOImkFMuo65//4YcivK0rVaYh9uh2S1K3ycaDeUPDf0ulc/AwHnxWGR6yBD2N5idTwt1bsULdy0=
|
Loading…
Reference in New Issue