toys-ci 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +33 -28
- data/lib/toys/ci/template.rb +19 -14
- data/lib/toys/ci/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 930f8dd02101b632b43de132bdb4cd9bb5dc5a322ce439237ab9a196f63b8af7
|
|
4
|
+
data.tar.gz: 2ff9f4e94186f53de050cf887ada97be286a468715e4c246306c10aa9f7e9feb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c4f7724718a3d79c11f18d33101ca1aab775f6e1a989551a262f3ccac7428cc4fe34269cbb3eb782912445eee601d0278e4f0fd22d8791f5a23c47c330bd687e
|
|
7
|
+
data.tar.gz: 7ddcd750e4f5e0fad97e3e14898d40095fa3debf1fcb0b88625126c1ceee889700cf92eb79ba27b3c06e3d8090944e9bd98f2f54720c356dc6124a43a27391c4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -20,43 +20,48 @@ and produces a final report of the results.
|
|
|
20
20
|
|
|
21
21
|
Given the following `.toys.rb`:
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
```ruby
|
|
24
|
+
# Create a "test" tool that runs minitest-based tests
|
|
25
|
+
expand :minitest, bundler: true
|
|
26
|
+
|
|
27
|
+
# Create a "rubocop" tool that checks the code base
|
|
28
|
+
expand :rubocop, bundler: true
|
|
29
|
+
|
|
30
|
+
# Create a "ci" tool that runs the above tools and
|
|
31
|
+
# summarizes their results
|
|
32
|
+
tool "ci" do
|
|
33
|
+
load_gem "toys-ci"
|
|
34
|
+
|
|
35
|
+
expand(Toys::CI::Template) do |ci|
|
|
36
|
+
ci.only_flag = true
|
|
37
|
+
ci.tool_job("Run Rubocop", ["rubocop"], flag: :rubocop)
|
|
38
|
+
ci.tool_job("Run tests", ["test"], flag: :tests)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
```
|
|
40
42
|
|
|
41
43
|
Now you can:
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
```
|
|
46
|
+
$ toys ci # Runs both jobs
|
|
47
|
+
$ toys ci --only --tests # Runs only the tests
|
|
48
|
+
```
|
|
45
49
|
|
|
46
50
|
### Key features
|
|
47
51
|
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
* Two interfaces: a high level Template interface that generates an entire
|
|
53
|
+
tool for you including configuration flags, and a low-level Mixin interface
|
|
54
|
+
that provides convenient methods that you can call to write your own CI
|
|
55
|
+
tool.
|
|
51
56
|
|
|
52
|
-
*
|
|
53
|
-
|
|
57
|
+
* The high-level interface generates flags that allow selection of individual
|
|
58
|
+
jobs and groups of jobs to execute.
|
|
54
59
|
|
|
55
|
-
*
|
|
56
|
-
|
|
60
|
+
* Optionally analyzes diffs and skips jobs that do not need executing because
|
|
61
|
+
no relevant changes have occurred.
|
|
57
62
|
|
|
58
|
-
*
|
|
59
|
-
|
|
63
|
+
* Customize your tool, including implementing additional flags and
|
|
64
|
+
functionality, using the power of the Toys framework.
|
|
60
65
|
|
|
61
66
|
### System requirements
|
|
62
67
|
|
data/lib/toys/ci/template.rb
CHANGED
|
@@ -40,6 +40,25 @@ module Toys
|
|
|
40
40
|
class Template
|
|
41
41
|
include ::Toys::Template
|
|
42
42
|
|
|
43
|
+
##
|
|
44
|
+
# Create the CI template.
|
|
45
|
+
# This template provides no direct arguments.
|
|
46
|
+
# All configuration of this template should be done by calling methods
|
|
47
|
+
# on the template in the expand block.
|
|
48
|
+
#
|
|
49
|
+
def initialize
|
|
50
|
+
@jobs = []
|
|
51
|
+
@collections = []
|
|
52
|
+
@all_flag = nil
|
|
53
|
+
@only_flag = nil
|
|
54
|
+
@jobs_disabled_by_default = nil
|
|
55
|
+
@fail_fast_flag = nil
|
|
56
|
+
@fail_fast_default = false
|
|
57
|
+
@base_ref_flag = nil
|
|
58
|
+
@use_github_base_ref_flag = nil
|
|
59
|
+
@prerun = nil
|
|
60
|
+
end
|
|
61
|
+
|
|
43
62
|
##
|
|
44
63
|
# Add a job implemented by a tool call.
|
|
45
64
|
#
|
|
@@ -273,20 +292,6 @@ module Toys
|
|
|
273
292
|
@use_github_base_ref_flag = value
|
|
274
293
|
end
|
|
275
294
|
|
|
276
|
-
# @private
|
|
277
|
-
def initialize
|
|
278
|
-
@jobs = []
|
|
279
|
-
@collections = []
|
|
280
|
-
@all_flag = nil
|
|
281
|
-
@only_flag = nil
|
|
282
|
-
@jobs_disabled_by_default = nil
|
|
283
|
-
@fail_fast_flag = nil
|
|
284
|
-
@fail_fast_default = false
|
|
285
|
-
@base_ref_flag = nil
|
|
286
|
-
@use_github_base_ref_flag = nil
|
|
287
|
-
@prerun = nil
|
|
288
|
-
end
|
|
289
|
-
|
|
290
295
|
# @private
|
|
291
296
|
BlockJob = ::Struct.new(:name, :flag, :override_flags, :trigger_paths, :block)
|
|
292
297
|
|
data/lib/toys/ci/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: toys-ci
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Azuma
|
|
@@ -46,10 +46,10 @@ homepage: https://github.com/dazuma/toys
|
|
|
46
46
|
licenses:
|
|
47
47
|
- MIT
|
|
48
48
|
metadata:
|
|
49
|
-
changelog_uri: https://dazuma.github.io/toys/gems/toys-ci/v0.1.
|
|
50
|
-
source_code_uri: https://github.com/dazuma/toys/tree/toys-ci/v0.1.
|
|
49
|
+
changelog_uri: https://dazuma.github.io/toys/gems/toys-ci/v0.1.1/file.CHANGELOG.html
|
|
50
|
+
source_code_uri: https://github.com/dazuma/toys/tree/toys-ci/v0.1.1/toys-ci
|
|
51
51
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
|
52
|
-
documentation_uri: https://dazuma.github.io/toys/gems/toys-ci/v0.1.
|
|
52
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys-ci/v0.1.1
|
|
53
53
|
rdoc_options: []
|
|
54
54
|
require_paths:
|
|
55
55
|
- lib
|
|
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
65
|
version: '0'
|
|
66
66
|
requirements: []
|
|
67
|
-
rubygems_version: 4.0.
|
|
67
|
+
rubygems_version: 4.0.6
|
|
68
68
|
specification_version: 4
|
|
69
69
|
summary: CI system using GitHub Actions and Toys
|
|
70
70
|
test_files: []
|