misc
parent
63bf7b08c7
commit
1b6f43892c
|
@ -1,8 +1,7 @@
|
||||||
version: 2
|
version: 2
|
||||||
# executor: "machine"
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
executor: "machine"
|
machine: true
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
@ -26,7 +25,7 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Run Ruby tests
|
name: Run Ruby tests
|
||||||
command: |
|
command: |
|
||||||
sudo docker-compose run web rspec spec
|
sudo docker-compose run web rspec spec
|
||||||
- run:
|
- run:
|
||||||
name: Run linters
|
name: Run linters
|
||||||
command: |
|
command: |
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2.5.1
|
2.6.1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class CorpusEmitter
|
class CorpusEmitter
|
||||||
PIPE = "\n | "
|
PIPE = "\n | "
|
||||||
|
|
||||||
class CSArg
|
class CSArg
|
||||||
TRANSLATIONS = {"integer" => "number",
|
TRANSLATIONS = {"integer" => "number",
|
||||||
|
@ -22,7 +22,7 @@ class CorpusEmitter
|
||||||
.map { |v| TRANSLATIONS[v] || v.camelize }
|
.map { |v| TRANSLATIONS[v] || v.camelize }
|
||||||
.uniq
|
.uniq
|
||||||
.sort
|
.sort
|
||||||
.join(PIPE)
|
.join("\n | ")
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_ts
|
def to_ts
|
||||||
|
@ -76,9 +76,8 @@ class CorpusEmitter
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_ts
|
def to_ts
|
||||||
"""
|
<<~NODE_EXPORTS
|
||||||
#{body_type}
|
#{body_type}
|
||||||
|
|
||||||
export interface #{camelize} {
|
export interface #{camelize} {
|
||||||
kind: #{name.inspect};
|
kind: #{name.inspect};
|
||||||
args: {#{arg_names}
|
args: {#{arg_names}
|
||||||
|
@ -86,7 +85,7 @@ class CorpusEmitter
|
||||||
comment?: string | undefined;
|
comment?: string | undefined;
|
||||||
#{body_attr}
|
#{body_attr}
|
||||||
}
|
}
|
||||||
"""
|
NODE_EXPORTS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -98,24 +97,28 @@ class CorpusEmitter
|
||||||
NODES = HASH[:nodes].map { |x| CSNode.new(x) }
|
NODES = HASH[:nodes].map { |x| CSNode.new(x) }
|
||||||
|
|
||||||
def const(key, val)
|
def const(key, val)
|
||||||
"\nexport const #{key} = #{val};"
|
"export const #{key} = #{val};"
|
||||||
end
|
end
|
||||||
|
|
||||||
def enum_type(key, val, inspect = true)
|
def enum_type(key, val, inspect = true)
|
||||||
"\nexport type #{key} = #{(inspect ? val.map(&:inspect) : val).join(PIPE)};"
|
"export type #{key} = #{(inspect ? val.map(&:inspect) : val).join(PIPE)};"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.generate
|
def self.generate
|
||||||
self.new.generate
|
self.new.generate
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def overwrite_warning_comment
|
||||||
|
<<~COMMENT.strip
|
||||||
|
// THIS INTERFACE WAS AUTO GENERATED ON #{Date.today}
|
||||||
|
// DO NOT EDIT THIS FILE.
|
||||||
|
// IT WILL BE OVERWRITTEN ON EVERY CELERYSCRIPT UPGRADE.
|
||||||
|
COMMENT
|
||||||
|
end
|
||||||
|
|
||||||
def generate
|
def generate
|
||||||
result = NODES.map(&:to_ts)
|
result = NODES.map(&:to_ts).map(&:strip)
|
||||||
result.unshift("""
|
result.unshift(overwrite_warning_comment)
|
||||||
// THIS INTERFACE WAS AUTO GENERATED ON #{Date.today}
|
|
||||||
// DO NOT EDIT THIS FILE.
|
|
||||||
// IT WILL BE OVERWRITTEN ON EVERY CELERYSCRIPT UPGRADE.
|
|
||||||
""")
|
|
||||||
result.push(enum_type :CeleryNode, NODES.map(&:name).map(&:camelize), false)
|
result.push(enum_type :CeleryNode, NODES.map(&:name).map(&:camelize), false)
|
||||||
result.push(const(:LATEST_VERSION, Sequence::LATEST_VERSION))
|
result.push(const(:LATEST_VERSION, Sequence::LATEST_VERSION))
|
||||||
result.push(const :DIGITAL, CeleryScriptSettingsBag::DIGITAL)
|
result.push(const :DIGITAL, CeleryScriptSettingsBag::DIGITAL)
|
||||||
|
@ -142,7 +145,7 @@ class CorpusEmitter
|
||||||
result.push(enum_type :AllowedGroupTypes, CeleryScriptSettingsBag::ALLOWED_EVERY_POINT_TYPE)
|
result.push(enum_type :AllowedGroupTypes, CeleryScriptSettingsBag::ALLOWED_EVERY_POINT_TYPE)
|
||||||
|
|
||||||
File.open("latest_corpus.ts", "w") do |f|
|
File.open("latest_corpus.ts", "w") do |f|
|
||||||
f.write(result.join.gsub("\n\n\n", "\n").gsub("\n\n", "\n").gsub("\n\n", "\n").strip)
|
f.write(result.join("\n\n").concat("\n"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
COVERAGE_FILE_PATH = "./coverage_fe/index.html"
|
COVERAGE_FILE_PATH = "./coverage_fe/index.html"
|
||||||
THRESHOLD = 0.001
|
THRESHOLD = 0.001
|
||||||
REPO_URL = "https://api.github.com/repos/Farmbot/Farmbot-Web-App"
|
REPO_URL = "https://api.github.com/repos/Farmbot/Farmbot-Web-App"
|
||||||
CURRENT_BRANCH = ENV.fetch("CIRCLE_BRANCH", "staging")
|
CURRENT_BRANCH = ENV.fetch("CIRCLE_BRANCH", "staging") # "staging" or "pull/11"
|
||||||
CURRENT_COMMIT = ENV.fetch("CIRCLE_SHA1", "")
|
CURRENT_COMMIT = ENV.fetch("CIRCLE_SHA1", "")
|
||||||
CSS_SELECTOR = ".fraction"
|
CSS_SELECTOR = ".fraction"
|
||||||
FRACTION_DELIM = "/"
|
FRACTION_DELIM = "/"
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
sudo docker-compose run web npm run tslint &
|
sudo docker-compose run web npm run linters &
|
||||||
P1=$!
|
P1=$!
|
||||||
|
|
||||||
sudo docker-compose run web npm run sass-lint &
|
sudo docker-compose run web rspec spec &
|
||||||
P2=$!
|
P2=$!
|
||||||
|
|
||||||
sudo docker-compose run web npm run typecheck &
|
sudo docker-compose run web npm run test-slow &
|
||||||
P3=$!
|
P3=$!
|
||||||
|
|
||||||
sudo docker-compose run web rspec spec &
|
sudo docker-compose run web npm run coverage &
|
||||||
P4=$!
|
P4=$!
|
||||||
|
|
||||||
sudo docker-compose run web npm run test-slow &
|
wait $P1 $P2 $P3 $P4
|
||||||
P5=$!
|
|
||||||
|
|
||||||
sudo docker-compose run web npm run coverage &
|
|
||||||
P6=$!
|
|
||||||
|
|
||||||
wait $P1 $P2 $P3 $P4 $P5 $P6
|
|
||||||
|
|
Loading…
Reference in New Issue