Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
fab837b9
Commit
fab837b9
authored
4 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[ci] add format check on tests job
parent
a925f2c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1315
auto install rust
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
app/modules/crawler/lib/sync/Watcher.ts
+7
-1
7 additions, 1 deletion
app/modules/crawler/lib/sync/Watcher.ts
format.sh
+11
-0
11 additions, 0 deletions
format.sh
package.json
+2
-2
2 additions, 2 deletions
package.json
with
21 additions
and
3 deletions
.gitlab-ci.yml
+
1
−
0
View file @
fab837b9
...
@@ -86,6 +86,7 @@ tests:
...
@@ -86,6 +86,7 @@ tests:
stage
:
tests
stage
:
tests
script
:
script
:
-
npm i
-
npm i
-
npm run format:check
-
npm test
-
npm test
# Push coverage to GitLab pages
# Push coverage to GitLab pages
-
tar cvzf coverage.tar.gz coverage/
-
tar cvzf coverage.tar.gz coverage/
...
...
This diff is collapsed.
Click to expand it.
app/modules/crawler/lib/sync/Watcher.ts
+
7
−
1
View file @
fab837b9
...
@@ -265,7 +265,13 @@ export class MultimeterWatcher implements Watcher {
...
@@ -265,7 +265,13 @@ export class MultimeterWatcher implements Watcher {
if
(
duration
)
{
if
(
duration
)
{
const
durationSecs
=
Math
.
floor
(
duration
/
1000
);
const
durationSecs
=
Math
.
floor
(
duration
/
1000
);
const
durationMillisRemain
=
duration
%
1000
;
const
durationMillisRemain
=
duration
%
1000
;
this
.
multi
.
write
(
"
\n
All done in
"
+
durationSecs
+
"
.
"
+
durationMillisRemain
+
"
seconds.
\n
"
);
this
.
multi
.
write
(
"
\n
All done in
"
+
durationSecs
+
"
.
"
+
durationMillisRemain
+
"
seconds.
\n
"
);
}
else
{
}
else
{
this
.
multi
.
write
(
"
\n
All done.
\n
"
);
this
.
multi
.
write
(
"
\n
All done.
\n
"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
format.sh
0 → 100755
+
11
−
0
View file @
fab837b9
#!/bin/sh
if
[
"
${
1
}
"
=
"check"
]
then
$HOME
/.cargo/bin/cargo
fmt
--
--check
&&
prettier
--list-different
"app/**/*.{ts,json}"
elif
[
"
${
1
}
"
=
"all"
]
then
$HOME
/.cargo/bin/cargo
fmt
&&
prettier
--write
"app/**/*.{ts,json}"
else
echo
"first argument must be
\"
check
\"
or
\"
all
\"
."
fi
This diff is collapsed.
Click to expand it.
package.json
+
2
−
2
View file @
fab837b9
...
@@ -36,8 +36,8 @@
...
@@ -36,8 +36,8 @@
"install"
:
"./neon/build.sh"
,
"install"
:
"./neon/build.sh"
,
"lint"
:
"lint-staged"
,
"lint"
:
"lint-staged"
,
"prettier"
:
"prettier --write app/**/*/*.ts"
,
"prettier"
:
"prettier --write app/**/*/*.ts"
,
"format:check"
:
"
prettier --list-different
\"
app/**/*.{ts,json}
\"
"
,
"format:check"
:
"
./format.sh check
"
,
"format:all"
:
"
prettier --write
\"
app/**/*.{ts,json}
\"
"
"format:all"
:
"
./format.sh all
"
},
},
"nyc"
:
{
"nyc"
:
{
"require"
:
[
"require"
:
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment