metanorma 1.1.4 → 1.2.1

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: 72a6cdf0d2785bbc70cc907a024ab4e03ce4bdf5cd744c73ccc24ee0e928e092
4
- data.tar.gz: bae5a06c2b0b71ecc46ed52699607eb235aa05d327f474328cce113510d4616e
3
+ metadata.gz: 6a7eed0e26e4338f4485a309446b6d0c008dc76773d8672e7560fa672af77b70
4
+ data.tar.gz: a5d36260967385bb27afb23cfc024802e08809212acdbfc369bffa5c46c37196
5
5
  SHA512:
6
- metadata.gz: 78f0012cc133961e454a58e28a67c47a527a766ef85d8e995b7495f5095ec149bc7b89849ca565c8b668487e43ef90d1cc2d0c00658deee546d15295280352cd
7
- data.tar.gz: 48a352c90ab1d5b4c2cd8e0e8581e58cd8425399d34cde1ba9ceafb333f36d2a6c048f59f739057840ce5bb6c7a0db2c5973dc26113c4d8102daf7300b806605
6
+ metadata.gz: 39e7761252dfc8467cd23fe1f5051c74a0c441b3cc8ff0d509793c8eaf04e7f135792ed34b12b1307a3cf85f593bb6b4f955feed831a3b0b1e156aa2a11a65de
7
+ data.tar.gz: 7a94bd3e934c6255ecaa5a153eaf286aaf34ae49f03b326e4dbf12d03cbe51fca18bf971de3c7c68b399ea82f57671c4cbfc0d060b58e4e893cc0d7799fcad7c
@@ -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
@@ -220,13 +243,14 @@ module Metanorma
220
243
  docid = bib&.at(ns("./docidentifier"))&.text
221
244
  unless @files[docid]
222
245
  warn "Cannot find crossreference to document #{docid} in document "\
223
- "#{identifier}!"
246
+ "#{identifier}!"
224
247
  abort
225
248
  end
226
249
  id = bib["id"]
227
250
  newbib = bib.replace(@files[docid][:bibdata])
228
251
  newbib.name = "bibitem"
229
252
  newbib["id"] = id
253
+ newbib["hidden"] = "true"
230
254
  newbib&.at(ns("./ext"))&.remove
231
255
  _file, url = targetfile(@files[docid], false)
232
256
  uri_node = Nokogiri::XML::Node.new "uri", newbib
@@ -254,6 +278,9 @@ module Metanorma
254
278
  update_bibitem(b, identifier)
255
279
  update_anchors(b, docxml, docid)
256
280
  end
281
+ docxml.xpath(ns("//references[not(./bibitem[not(@hidden) or @hidden = 'false'])]")).each do |f|
282
+ f["hidden"] = "true"
283
+ end
257
284
  docxml.to_xml
258
285
  end
259
286
 
@@ -288,9 +315,12 @@ module Metanorma
288
315
  # warn "metanorma compile -x html #{f.path}"
289
316
  c = Compile.new
290
317
  c.compile f.path, format: :asciidoc, extension_keys: @format
291
- @format.each do |ext|
318
+ @files[identifier][:outputs] = {}
319
+ @format.each do |e|
320
+ ext = c.processor.output_formats[e]
292
321
  fn = File.basename(filename).sub(/(?<=\.)[^\.]+$/, ext.to_s)
293
322
  FileUtils.mv f.path.sub(/\.xml$/, ".#{ext}"), File.join(@outdir, fn)
323
+ @files[identifier][:outputs][e] = File.join(@outdir, fn)
294
324
  end
295
325
  end
296
326
  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
@@ -7,8 +7,7 @@ module Metanorma
7
7
 
8
8
  def process(file, filename, type, options = {})
9
9
  require "asciidoctor"
10
- ::Asciidoctor.convert(
11
- file,
10
+ out_opts = {
12
11
  to_file: false,
13
12
  safe: :safe,
14
13
  backend: type,
@@ -16,8 +15,28 @@ module Metanorma
16
15
  attributes: [
17
16
  "nodoc", "stem", "xrefstyle=short", "docfile=#{filename}",
18
17
  "output_dir=#{options[:"output-dir"]}"
19
- ],
20
- )
18
+ ]
19
+ }
20
+ unless asciidoctor_validate(file, filename, out_opts)
21
+ warn "Cannot continue compiling Asciidoctor document"
22
+ abort
23
+ end
24
+ ::Asciidoctor.convert(file, out_opts)
25
+ end
26
+
27
+ def asciidoctor_validate(file, filename, options)
28
+ err = nil
29
+ begin
30
+ previous_stderr, $stderr = $stderr, StringIO.new
31
+ ::Asciidoctor.load(file, options)
32
+ %r{(\n|^)asciidoctor: ERROR: ['"]?#{Regexp.escape(filename ||
33
+ "<empty>")}['"]?: line \d+: include file not found: }.match($stderr.string) and
34
+ err = $stderr.string
35
+ ensure
36
+ $stderr = previous_stderr
37
+ end
38
+ warn err unless err.nil?
39
+ err.nil?
21
40
  end
22
41
 
23
42
  def extract_metanorma_options(file)
@@ -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.4"
2
+ VERSION = "1.2.1"
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.5.8"
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.4
4
+ version: 1.2.1
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-08-27 00:00:00.000000000 Z
11
+ date: 2020-11-30 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.5.8
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.5.8
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