misc
parent
63bf7b08c7
commit
1b6f43892c
|
@ -1,8 +1,7 @@
|
|||
version: 2
|
||||
# executor: "machine"
|
||||
jobs:
|
||||
build:
|
||||
executor: "machine"
|
||||
machine: true
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
|
|
|
@ -1 +1 @@
|
|||
2.5.1
|
||||
2.6.1
|
||||
|
|
|
@ -22,7 +22,7 @@ class CorpusEmitter
|
|||
.map { |v| TRANSLATIONS[v] || v.camelize }
|
||||
.uniq
|
||||
.sort
|
||||
.join(PIPE)
|
||||
.join("\n | ")
|
||||
end
|
||||
|
||||
def to_ts
|
||||
|
@ -76,9 +76,8 @@ class CorpusEmitter
|
|||
end
|
||||
|
||||
def to_ts
|
||||
"""
|
||||
<<~NODE_EXPORTS
|
||||
#{body_type}
|
||||
|
||||
export interface #{camelize} {
|
||||
kind: #{name.inspect};
|
||||
args: {#{arg_names}
|
||||
|
@ -86,7 +85,7 @@ class CorpusEmitter
|
|||
comment?: string | undefined;
|
||||
#{body_attr}
|
||||
}
|
||||
"""
|
||||
NODE_EXPORTS
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -98,24 +97,28 @@ class CorpusEmitter
|
|||
NODES = HASH[:nodes].map { |x| CSNode.new(x) }
|
||||
|
||||
def const(key, val)
|
||||
"\nexport const #{key} = #{val};"
|
||||
"export const #{key} = #{val};"
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
def self.generate
|
||||
self.new.generate
|
||||
end
|
||||
|
||||
def generate
|
||||
result = NODES.map(&:to_ts)
|
||||
result.unshift("""
|
||||
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
|
||||
result = NODES.map(&:to_ts).map(&:strip)
|
||||
result.unshift(overwrite_warning_comment)
|
||||
result.push(enum_type :CeleryNode, NODES.map(&:name).map(&:camelize), false)
|
||||
result.push(const(:LATEST_VERSION, Sequence::LATEST_VERSION))
|
||||
result.push(const :DIGITAL, CeleryScriptSettingsBag::DIGITAL)
|
||||
|
@ -142,7 +145,7 @@ class CorpusEmitter
|
|||
result.push(enum_type :AllowedGroupTypes, CeleryScriptSettingsBag::ALLOWED_EVERY_POINT_TYPE)
|
||||
|
||||
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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
COVERAGE_FILE_PATH = "./coverage_fe/index.html"
|
||||
THRESHOLD = 0.001
|
||||
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", "")
|
||||
CSS_SELECTOR = ".fraction"
|
||||
FRACTION_DELIM = "/"
|
||||
|
|
|
@ -1,21 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
sudo docker-compose run web npm run tslint &
|
||||
sudo docker-compose run web npm run linters &
|
||||
P1=$!
|
||||
|
||||
sudo docker-compose run web npm run sass-lint &
|
||||
sudo docker-compose run web rspec spec &
|
||||
P2=$!
|
||||
|
||||
sudo docker-compose run web npm run typecheck &
|
||||
sudo docker-compose run web npm run test-slow &
|
||||
P3=$!
|
||||
|
||||
sudo docker-compose run web rspec spec &
|
||||
sudo docker-compose run web npm run coverage &
|
||||
P4=$!
|
||||
|
||||
sudo docker-compose run web npm run test-slow &
|
||||
P5=$!
|
||||
|
||||
sudo docker-compose run web npm run coverage &
|
||||
P6=$!
|
||||
|
||||
wait $P1 $P2 $P3 $P4 $P5 $P6
|
||||
wait $P1 $P2 $P3 $P4
|
||||
|
|
Loading…
Reference in New Issue