metanorma 1.1.5 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42020b6888a6b5d4d11678cc5d3d217e93ced978e477d05fee31a6593722f78b
4
- data.tar.gz: 4379ba9bcf18655c119598b44ead30f223d843edb33ce53205d4ad6c16826904
3
+ metadata.gz: 9718bdc06f44f31d38c70b61597971da40b59aec92c34803fd90dee5a9737ef3
4
+ data.tar.gz: b4441a0010cc32bcea52b79533649bdde985f3a18054827f039346c1db0ba296
5
5
  SHA512:
6
- metadata.gz: 67525ff08b409c36a90cc8725dc150a518b2c3888f0b3518cc83113b51dcc739ba89120681fe0c2e36c4c6b8771178afe1abe25c64887aee93b29fb055c82a4e
7
- data.tar.gz: c0f35a9f5f0e3b0397fb0f81eaf84b90be85f09af4cb99a25e9ac146e0b9658c0b0c26883015c0a8979d656f12d57f5dc0cb24f1af92fa1cb9c58ba7f5e13a90
6
+ metadata.gz: ed6c60df3dc293db574f7484e918deda0de754d23696e95834d30856bbc8c6a0917aebf15d0fad56e13bc7bfc5ef133b9554e92a679f949ac6495171bcc77025
7
+ data.tar.gz: 5c65c98e7194b3a366977a356d9f44fdbc3f2b2ebf4d871ee76b8f040f7ef824d540eccc82850c1e06908058210ed2cf2f58740388eee29fd63c977b6a80fa78
@@ -0,0 +1,47 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: notify
4
+
5
+ on:
6
+ push:
7
+ branches: [ master ]
8
+ tags:
9
+ - '*'
10
+
11
+ jobs:
12
+ notify:
13
+ name: Notify dependent repos
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Trigger repositories
17
+ env:
18
+ GH_USERNAME: metanorma-ci
19
+ GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
20
+ run: |
21
+ curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
22
+ [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
23
+ CLIENT_PAYLOAD=$(cat <<EOF
24
+ "{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
25
+ EOF
26
+ )
27
+ for repo in $TEMPLATE_REPOS" $SAMPLES_REPOS"
28
+ do
29
+ sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
30
+ done
31
+
32
+ - name: Trigger release repositories
33
+ if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
34
+ env:
35
+ GH_USERNAME: metanorma-ci
36
+ GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
37
+ run: |
38
+ curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
39
+ [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
40
+ CLIENT_PAYLOAD=$(cat <<EOF
41
+ "{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
42
+ EOF
43
+ )
44
+ for repo in $DEPENDENT_REPOS
45
+ do
46
+ sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
47
+ done
@@ -0,0 +1,59 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ jobs:
12
+ rake:
13
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ continue-on-error: ${{ matrix.experimental }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [ '2.6', '2.5', '2.4' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
21
+ experimental: [ false ]
22
+ include:
23
+ - ruby: '2.7'
24
+ os: 'ubuntu-latest'
25
+ experimental: true
26
+ - ruby: '2.7'
27
+ os: 'windows-latest'
28
+ experimental: true
29
+ - ruby: '2.7'
30
+ os: 'macos-latest'
31
+ experimental: true
32
+ steps:
33
+ - uses: actions/checkout@master
34
+
35
+ - name: Use Ruby
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: ${{ matrix.ruby }}
39
+ bundler-cache: true
40
+
41
+ - name: Update gems
42
+ run: bundle install --jobs 4 --retry 3
43
+
44
+ - name: Run specs
45
+ run: bundle exec rake
46
+
47
+ notify:
48
+ name: Trigger notify workflow
49
+ needs: rake
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - name: Trigger notify workflow
53
+ uses: Sibz/github-status-action@v1
54
+ with:
55
+ authToken: ${{ secrets.GITHUB_TOKEN }}
56
+ context: 'tests-passed-successfully'
57
+ description: 'Tests passed successfully'
58
+ state: 'success'
59
+ sha: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -1,9 +1,7 @@
1
1
  = Metanorma: the standard for standards
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma.svg["Gem Version", link="https://rubygems.org/gems/metanorma"]
4
- image:https://github.com/metanorma/metanorma/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Aubuntu"]
5
- image:https://github.com/metanorma/metanorma/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Amacos"]
6
- image:https://github.com/metanorma/metanorma/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Awindows"]
4
+ image:https://github.com/metanorma/metanorma/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma/actions?workflow=rake"]
7
5
  image:https://codeclimate.com/github/metanorma/metanorma/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma"]
8
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma.svg["Pull Requests", link="https://github.com/metanorma/metanorma/pulls"]
9
7
  image:https://img.shields.io/github/commits-since/metanorma/metanorma/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma/releases"]
@@ -12,10 +12,10 @@ module Metanorma
12
12
 
13
13
  # @return [Array<String>] documents-inline to inject the XML into
14
14
  # the collection manifest; documents-external to keeps them outside
15
- attr_reader :directives
15
+ attr_accessor :directives
16
16
 
17
17
  # @return [Hash<String, Metanorma::Document>]
18
- attr_reader :documents
18
+ attr_accessor :documents
19
19
 
20
20
  # @param file [String] path to source file
21
21
  # @param directives [Array<String>] documents-inline to inject the XML into
@@ -47,7 +47,7 @@ module Metanorma
47
47
  Nokogiri::XML::Builder.new do |xml|
48
48
  xml.send("metanorma-collection",
49
49
  "xmlns" => "http://metanorma.org") do |mc|
50
- @bibdata.to_xml mc, bibdata: true, date_format: :full
50
+ mc << @bibdata.to_xml(bibdata: true, date_format: :full)
51
51
  @manifest.to_xml mc
52
52
  content_to_xml "prefatory", mc
53
53
  doccontainer mc
@@ -49,9 +49,32 @@ module Metanorma
49
49
  folder = File.dirname col.file
50
50
  cr = new(col.to_xml, folder, options)
51
51
  cr.files
52
+ cr.concatenate(col, options)
52
53
  cr.coverpage if options[:format]&.include?(:html)
53
54
  end
54
55
 
56
+ def concatenate(col, options)
57
+ options[:format] << :presentation if options[:format].include?(:pdf)
58
+ options[:format].uniq.each do |e|
59
+ next unless %i(presentation xml).include?(e)
60
+ ext = e == :presentation ? "presentation.xml" : e.to_s
61
+ out = col.clone
62
+ out.directives << "documents-inline"
63
+ out.documents.keys.each do |id|
64
+ filename = @files[id][:outputs][e]
65
+ out.documents[id] = Metanorma::Document.raw_file(filename)
66
+ end
67
+ File.open(File.join(@outdir, "collection.#{ext}"), "w:UTF-8") { |f| f.write(out.to_xml) }
68
+ end
69
+ options[:format].include?(:pdf) and
70
+ pdfconv.convert(File.join(@outdir, "collection.presentation.xml"))
71
+ end
72
+
73
+ def pdfconv
74
+ x = Asciidoctor.load nil, backend: @doctype.to_sym
75
+ x.converter.pdf_converter(Dummy.new)
76
+ end
77
+
55
78
  # Dummy class
56
79
  class Dummy
57
80
  def attr(_xyz); end
@@ -106,12 +129,34 @@ module Metanorma
106
129
  end
107
130
  file, _filename = targetfile(files[identifier], true)
108
131
  xml = Nokogiri::XML(file)
132
+ add_document_suffix(identifier, xml)
109
133
  files[identifier][:anchors] = read_anchors(xml)
110
134
  files[identifier][:bibdata] = xml.at(ns("//bibdata"))
111
135
  end
112
136
  files
113
137
  end
114
138
 
139
+ def add_suffix_to_attributes(doc, suffix, tag_name, attribute_name)
140
+ doc.xpath(ns("//#{tag_name}[@#{attribute_name}]")).each do |elem|
141
+ elem.attributes[attribute_name].value =
142
+ "#{elem.attributes[attribute_name].value}_#{suffix}"
143
+ end
144
+ end
145
+
146
+ def add_document_suffix(identifier, doc)
147
+ document_suffix = Asciidoctor::Standoc::Cleanup.to_ncname(identifier)
148
+ [%w[* id],
149
+ %w[* bibitemid],
150
+ %w[review from],
151
+ %w[review to],
152
+ %w[index to],
153
+ %w[xref target],
154
+ %w[callout target]]
155
+ .each do |(tag_name, attribute_name)|
156
+ add_suffix_to_attributes(doc, document_suffix, tag_name, attribute_name)
157
+ end
158
+ end
159
+
115
160
  # map locality type and label (e.g. "clause" "1") to id = anchor for
116
161
  # a document
117
162
  def read_anchors(xml)
@@ -220,13 +265,14 @@ module Metanorma
220
265
  docid = bib&.at(ns("./docidentifier"))&.text
221
266
  unless @files[docid]
222
267
  warn "Cannot find crossreference to document #{docid} in document "\
223
- "#{identifier}!"
268
+ "#{identifier}!"
224
269
  abort
225
270
  end
226
271
  id = bib["id"]
227
272
  newbib = bib.replace(@files[docid][:bibdata])
228
273
  newbib.name = "bibitem"
229
274
  newbib["id"] = id
275
+ newbib["hidden"] = "true"
230
276
  newbib&.at(ns("./ext"))&.remove
231
277
  _file, url = targetfile(@files[docid], false)
232
278
  uri_node = Nokogiri::XML::Node.new "uri", newbib
@@ -247,6 +293,7 @@ module Metanorma
247
293
  # @return [String] XML content
248
294
  def update_xrefs(file, identifier)
249
295
  docxml = Nokogiri::XML(file)
296
+ add_document_suffix(identifier, docxml)
250
297
  docxml.xpath(ns("//bibitem[not(ancestor::bibitem)]")).each do |b|
251
298
  docid = b&.at(ns("./docidentifier[@type = 'repository']"))&.text
252
299
  next unless docid && %r{^current-metanorma-collection/}.match(docid)
@@ -254,6 +301,9 @@ module Metanorma
254
301
  update_bibitem(b, identifier)
255
302
  update_anchors(b, docxml, docid)
256
303
  end
304
+ docxml.xpath(ns("//references[not(./bibitem[not(@hidden) or @hidden = 'false'])]")).each do |f|
305
+ f["hidden"] = "true"
306
+ end
257
307
  docxml.to_xml
258
308
  end
259
309
 
@@ -288,9 +338,12 @@ module Metanorma
288
338
  # warn "metanorma compile -x html #{f.path}"
289
339
  c = Compile.new
290
340
  c.compile f.path, format: :asciidoc, extension_keys: @format
291
- @format.each do |ext|
341
+ @files[identifier][:outputs] = {}
342
+ @format.each do |e|
343
+ ext = c.processor.output_formats[e]
292
344
  fn = File.basename(filename).sub(/(?<=\.)[^\.]+$/, ext.to_s)
293
345
  FileUtils.mv f.path.sub(/\.xml$/, ".#{ext}"), File.join(@outdir, fn)
346
+ @files[identifier][:outputs][e] = File.join(@outdir, fn)
294
347
  end
295
348
  end
296
349
  end
@@ -5,7 +5,7 @@ require "htmlentities"
5
5
  module Metanorma
6
6
  class Compile
7
7
  # @return [Array<String>]
8
- attr_reader :errors
8
+ attr_reader :errors, :processor
9
9
 
10
10
  def initialize
11
11
  @registry = Metanorma::Registry.instance
@@ -15,7 +15,7 @@ module Metanorma
15
15
  attr_accessor :logs
16
16
 
17
17
  def initialize
18
- @logs ||= [:warning, :error]
18
+ @logs ||= [:warning, :error, :fatal]
19
19
  end
20
20
  end
21
21
 
@@ -4,9 +4,10 @@ module Metanorma
4
4
  attr_reader :file
5
5
 
6
6
  # @param bibitem [RelatonBib::BibliographicItem]
7
- def initialize(bibitem, file)
7
+ def initialize(bibitem, file, options = {})
8
8
  @bibitem = bibitem
9
9
  @file = file
10
+ @raw = options[:raw]
10
11
  end
11
12
 
12
13
  class << self
@@ -22,6 +23,12 @@ module Metanorma
22
23
  new from_xml(xml)
23
24
  end
24
25
 
26
+ # raw XML file, can be used to put in entire file instead of just bibitem
27
+ def raw_file(filename)
28
+ doc = Nokogiri::XML(File.read(filename, encoding: "UTF-8"))
29
+ new(doc, filename, raw: true)
30
+ end
31
+
25
32
  private
26
33
 
27
34
  # #param xml [Nokogiri::XML::Document, Nokogiri::XML::Element]
@@ -47,7 +54,7 @@ module Metanorma
47
54
  when :xml
48
55
  from_xml Nokogiri::XML(File.read(file, encoding: "UTF-8"))
49
56
  when :yaml
50
- yaml = File.read(file, ecoding: "UTF-8")
57
+ yaml = File.read(file, encoding: "UTF-8")
51
58
  Relaton::Cli::YAMLConvertor.convert_single_file(yaml)
52
59
  end
53
60
  end
@@ -68,15 +75,19 @@ module Metanorma
68
75
 
69
76
  # @return [String]
70
77
  def type
71
- @type ||= (@bibitem.docidentifier.first&.type ||
72
- @bibitem.docidentifier.first&.id&.match(/^[^\s]+/)&.to_s)&.downcase ||
73
- "standoc"
78
+ @type ||= (@bibitem.docidentifier.first&.type&.downcase ||
79
+ @bibitem.docidentifier.first&.id&.match(/^[^\s]+/)&.to_s)&.downcase ||
80
+ "standoc"
74
81
  end
75
82
 
76
83
  private
77
84
 
78
85
  def render_xml(builder)
79
- builder.send(type + "-standard") { |b| @bibitem.to_xml b, bibdata: true }
86
+ if @raw
87
+ builder << @bibitem.root.to_xml
88
+ else
89
+ builder.send(type + "-standard") { |b| b << @bibitem.to_xml(bibdata: true) }
90
+ end
80
91
  end
81
92
  end
82
93
  end
@@ -4,10 +4,10 @@ require_relative "./utils.rb"
4
4
  module Metanorma
5
5
  module Output
6
6
  class XslfoPdf < Base
7
- def convert(url_path, output_path, xsl_stylesheet)
7
+ def convert(url_path, output_path, xsl_stylesheet, options = "")
8
8
  return if url_path.nil? || output_path.nil? || xsl_stylesheet.nil?
9
9
 
10
- Mn2pdf.convert(quote(url_path), quote(output_path), quote(xsl_stylesheet))
10
+ Mn2pdf.convert(quote(url_path), quote(output_path), quote(xsl_stylesheet), options)
11
11
  end
12
12
 
13
13
  def quote(x)
@@ -6,6 +6,10 @@ module Metanorma
6
6
  if log_types.include?(type.to_s)
7
7
  puts(message)
8
8
  end
9
+
10
+ if type == :fatal
11
+ exit(1)
12
+ end
9
13
  end
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.1.5"
2
+ VERSION = "1.2.2"
3
3
  end
@@ -27,13 +27,17 @@ Gem::Specification.new do |spec|
27
27
  spec.add_runtime_dependency 'htmlentities'
28
28
  spec.add_runtime_dependency 'nokogiri'
29
29
  spec.add_runtime_dependency 'mn2pdf', "~> 1"
30
- spec.add_dependency "relaton-cli", "~> 1.3.0"
30
+ spec.add_runtime_dependency 'pry'
31
+ # get relaton-cli to avoic circular reference with metanorma-standoc
32
+ #spec.add_dependency "relaton-cli"
33
+ #spec.add_dependency "metanorma-standoc", "~> 1.5.3"
31
34
 
32
35
  spec.add_development_dependency "rake", "~> 12.0"
33
36
  spec.add_development_dependency "rspec", "~> 3.0"
34
37
  spec.add_development_dependency "byebug", "~> 10.0"
35
38
  spec.add_development_dependency "rspec-command", "~> 1.0"
36
39
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
37
- spec.add_development_dependency "metanorma-iso", "~> 1.5"
38
- spec.add_development_dependency "isodoc", "~> 1.2.1"
40
+ spec.add_development_dependency "metanorma-iso", "~> 1.6.0"
41
+ spec.add_development_dependency "sassc", "~> 2.4.0"
42
+ #spec.add_development_dependency "isodoc", "~> 1.2.1"
39
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-11 00:00:00.000000000 Z
11
+ date: 2020-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -67,19 +67,19 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1'
69
69
  - !ruby/object:Gem::Dependency
70
- name: relaton-cli
70
+ name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 1.3.0
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 1.3.0
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '1.5'
159
+ version: 1.6.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '1.5'
166
+ version: 1.6.0
167
167
  - !ruby/object:Gem::Dependency
168
- name: isodoc
168
+ name: sassc
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 1.2.1
173
+ version: 2.4.0
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 1.2.1
180
+ version: 2.4.0
181
181
  description: Library to process any Metanorma standard.
182
182
  email:
183
183
  - open.source@ribose.com
@@ -189,9 +189,8 @@ extra_rdoc_files:
189
189
  - LICENSE.txt
190
190
  files:
191
191
  - ".github/workflows/dependent_repos.env"
192
- - ".github/workflows/macos.yml"
193
- - ".github/workflows/ubuntu.yml"
194
- - ".github/workflows/windows.yml"
192
+ - ".github/workflows/notify.yml"
193
+ - ".github/workflows/rake.yml"
195
194
  - ".gitignore"
196
195
  - ".hound.yml"
197
196
  - ".rspec"
@@ -1,38 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/ubuntu.yml
11
- - .github/workflows/windows.yml
12
-
13
- jobs:
14
- test-macos:
15
- name: Test on Ruby ${{ matrix.ruby }} macOS
16
- runs-on: macos-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- run: |
34
- sudo gem install bundler --force
35
- bundle install --jobs 4 --retry 3
36
- - name: Run specs
37
- run: |
38
- bundle exec rake
@@ -1,56 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- tags:
9
- - '*'
10
- pull_request:
11
- paths-ignore:
12
- - .github/workflows/macos.yml
13
- - .github/workflows/windows.yml
14
-
15
- jobs:
16
- test-linux:
17
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
18
- runs-on: ubuntu-latest
19
- continue-on-error: ${{ matrix.experimental }}
20
- strategy:
21
- fail-fast: false
22
- matrix:
23
- ruby: [ '2.6', '2.5', '2.4' ]
24
- experimental: [false]
25
- include:
26
- - ruby: '2.7'
27
- experimental: true
28
- steps:
29
- - uses: actions/checkout@master
30
- - name: Use Ruby
31
- uses: actions/setup-ruby@v1
32
- with:
33
- ruby-version: ${{ matrix.ruby }}
34
- - name: Update gems
35
- run: |
36
- gem install bundler
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake
41
- - name: Trigger repositories
42
- if: matrix.ruby == '2.6'
43
- env:
44
- GH_USERNAME: metanorma-ci
45
- GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
46
- run: |
47
- curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
48
- [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
49
- CLIENT_PAYLOAD=$(cat <<EOF
50
- "{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
51
- EOF
52
- )
53
- for repo in $REPOS
54
- do
55
- sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
56
- done
@@ -1,40 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/macos.yml
11
- - .github/workflows/ubuntu.yml
12
-
13
- jobs:
14
- test-windows:
15
- name: Test on Ruby ${{ matrix.ruby }} Windows
16
- runs-on: windows-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- shell: pwsh
34
- run: |
35
- gem install bundler
36
- bundle config --local path vendor/bundle
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake