File: test.yml

package info (click to toggle)
ruby-uuidtools 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: ruby: 1,284; makefile: 16
file content (128 lines) | stat: -rw-r--r-- 3,537 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  workflow_dispatch:

env:
  BUNDLE_JOBS: 4

# jobs defined in the order we want them listed in the Actions UI
jobs:
  coverage:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        ruby: [2.7]
        os: [ubuntu-22.04]
    env:
      COVERALLS_SERVICE_NAME: github
      COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      COVERALLS_DEBUG: true
      CI_BUILD_NUMBER: ${{ github.run_id }}
    steps:
      - uses: actions/checkout@v4

      - name: Setup ruby
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: false
          ruby-version: ${{ matrix.ruby }}

      - name: Install gems
        run: bundle install

      - name: Run specs and report coverage
        run: bundle exec rake

  test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # the job name is composed by these attributes
        ruby:
          - 2.3
          - 2.4
          - 2.5
          - 2.6
          - 2.7
          # quotes because of YAML gotcha: https://github.com/actions/runner/issues/849
          - '3.0'
          - 3.1
          - 3.2
          - 3.3
          - 3.4
          - jruby-9.1
          - jruby-9.2
          - jruby-9.3
          - jruby-9.4
          - truffleruby-22.2
          - truffleruby-22.3
          - truffleruby-24.1
        os:
          - ubuntu-22.04
        gemfile:
          - Gemfile
        include:
          # Ubuntu
          - { os: ubuntu-22.04, ruby: 3.4 }
          # macOS
          - { os: macos-13,     ruby: 3.4 }
          # Windows
          - { os: windows-2019, ruby: 3.4 }
          - { os: windows-2022, ruby: 3.4 }
          - { os: windows-2022, ruby: jruby-9.4 }
          # allowed to fail
          - { os: ubuntu-22.04, ruby: head, gemfile: Gemfile, allow-failure: true }
          - { os: ubuntu-22.04, ruby: jruby-head, gemfile: Gemfile, allow-failure: true }
          - { os: ubuntu-22.04, ruby: truffleruby-head, gemfile: Gemfile, allow-failure: true }
    env:
      BUNDLE_GEMFILE: ${{ matrix.gemfile }}
      # Workaround for Windows JRuby JDK issue
      # https://github.com/ruby/setup-ruby/issues/339
      # https://github.com/jruby/jruby/issues/7182#issuecomment-1112953015
      JAVA_OPTS: -Djdk.io.File.enableADS=true
    steps:
      - uses: actions/checkout@v4

      - name: Install libidn (Ubuntu)
        if: startsWith(matrix.os, 'ubuntu')
        run: sudo apt-get install libidn11-dev

      - name: Install libidn (macOS)
        if: startsWith(matrix.os, 'macos')
        run: brew install libidn

      - name: Setup ruby
        continue-on-error: ${{ matrix.allow-failure || false }}
        id: setupruby
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: false
          ruby-version: ${{ matrix.ruby }}

      - name: Install gems
        continue-on-error: ${{ matrix.allow-failure || false }}
        id: bundle
        run: bundle install

      - name: Run specs
        continue-on-error: ${{ matrix.allow-failure || false }}
        id: specs
        run: bundle exec rake spec

      # because continue-on-error marks the steps as pass if they fail
      - name: >-
          Setup ruby outcome: ${{ steps.setupruby.outcome }}
        run: echo NOOP
      - name: >-
          Install gems outcome: ${{ steps.bundle.outcome }}
        run: echo NOOP
      - name: >-
          Run specs outcome: ${{ steps.specs.outcome }}
        run: echo NOOP