-
Notifications
You must be signed in to change notification settings - Fork 12
75 lines (64 loc) · 2.33 KB
/
Copy pathci.yml
File metadata and controls
75 lines (64 loc) · 2.33 KB
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
name: CI
# Installs the bundle, builds the gem and runs the default test suite on the
# Ruby versions this project validates continuously.
#
# The supported range and the validated set are two different statements. The
# code is written for Ruby 3.3 through 4.0, which is what required_ruby_version
# says; the matrix below runs the ends of that range and the release in the
# middle, rather than every intermediate release. See doc/POLICY.md section 11
# and doc/REQUIREMENTS.md section 20.
#
# No credential is configured here and nothing reaches an external service: the
# suite must need neither (doc/POLICY.md Invariant 6). Examples tagged :network
# are excluded by default, and none of the Gemfile's optional groups is
# installed, so no plugin's own gem is a condition of this workflow passing.
#
# This is the required check, and it is deliberately the minimal configuration:
# what it proves on every commit is that the framework needs nothing but its
# four runtime dependencies. The all-plugins configuration is a separate,
# non-required workflow, plugins.yml.
on:
push:
branches: ['**']
paths-ignore:
- '**/*.md'
- 'doc/**'
pull_request:
paths-ignore:
- '**/*.md'
- 'doc/**'
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# The continuously validated versions. Keep this in step with the
# supported environment section of README.md; the floor here and
# required_ruby_version in automatic.gemspec are the same version.
ruby: ['3.3', '3.4', '4.0']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Show versions
run: |
ruby -v
bundle -v
- name: Check that the gemspec is valid and buildable
run: gem build automatic.gemspec
- name: Check that the library loads
run: bundle exec ruby -Ilib -e "require 'automatic'"
- name: Check that the CLI runs
run: |
bundle exec bin/automatic --version
bundle exec bin/automatic --help
- name: Run the test suite
run: bundle exec rake spec