File: ci.yml

package info (click to toggle)
ruby-airbrussh 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,712 kB
  • sloc: ruby: 1,579; sh: 3; makefile: 3
file content (57 lines) | stat: -rw-r--r-- 1,424 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
  pull_request:
  push:
    branches:
      - main
jobs:
  rubocop:
    name: "RuboCop"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ruby
          bundler-cache: true
      - run: bundle exec rubocop
  test:
    name: "Test / Ruby ${{ matrix.ruby }}"
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: ["3.1", "3.2", "3.3", "3.4", "head"]
    steps:
      - uses: actions/checkout@v6
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - run: bundle exec rake test
  test_legacy:
    name: "Test / Ruby ${{ matrix.ruby }}"
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: ["2.5", "2.6", "2.7", "3.0"]
    env:
      BUNDLE_GEMFILE: gemfiles/legacy.gemfile
    steps:
      - uses: actions/checkout@v6
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - run: bundle exec rake test
  test_all:
    name: "Test / Ruby (All)"
    runs-on: ubuntu-latest
    needs: ["test", "test_legacy"]
    if: always()
    steps:
      - name: All tests ok
        if: ${{ !(contains(needs.*.result, 'failure')) }}
        run: exit 0
      - name: Some tests failed
        if: ${{ contains(needs.*.result, 'failure') }}
        run: exit 1