.github/workflows/spec_guards.yml add

Translate a part of .travis.yml into GitHub Actions workflow.
This commit is contained in:
卜部昌平 2020-10-21 14:06:49 +09:00
Родитель 196eada8c6
Коммит 7cf34cfaa3
2 изменённых файлов: 40 добавлений и 24 удалений

40
.github/workflows/spec_guards.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,40 @@
name: Rubyspec Guard Checks
on: [push, pull_request]
jobs:
rubyspec:
name: Rubyspec
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
ruby:
# - ruby-2.1
# - ruby-2.2
# - ruby-2.3
# - ruby-2.4
- ruby-2.5
- ruby-2.6
- ruby-2.7
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: ruby ../mspec/bin/mspec
working-directory: spec/ruby
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |
{
"ci": "GitHub Actions",
"env": "${{ github.workflow }} / rubyspec @ ${{ matrix.ruby }}",
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"commit": "${{ github.sha }}",
"branch": "${{ github.ref }}".split('/').reverse()[0]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
if: failure() && github.event_name == 'push'

Просмотреть файл

@ -233,28 +233,6 @@ env:
zlib1g-dev:armhf
zlib1g:armhf
- &spec-on-old-ruby
language: ruby
before_install:
install:
before_script: chmod -R u+w spec/ruby
# -j randomly hangs.
script: ruby -C spec/ruby ../mspec/bin/mspec .
- &rubyspec25
name: Check ruby/spec version guards on Ruby 2.5
rvm: 2.5.7
<<: *spec-on-old-ruby
after_failure:
- echo "ruby/spec failed on Ruby 2.5. This is likely because of a missing ruby_version_is guard, please add it. See spec/README.md."
- &rubyspec27
name: Check ruby/spec version guards on Ruby 2.7
rvm: 2.7.0
<<: *spec-on-old-ruby
after_failure:
- echo "ruby/spec failed on Ruby 2.7. This is likely because of a missing ruby_version_is guard, please add it. See spec/README.md."
- &baseruby
name: "BASERUBY: Ruby 2.2"
<<: *gcc-8
@ -268,8 +246,6 @@ matrix:
- <<: *x86_64-linux
- <<: *i686-linux
- <<: *baseruby
- <<: *rubyspec25
- <<: *rubyspec27
# Build every commit (Allowed Failures):
- <<: *arm32-linux
- <<: *arm64-linux