Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use deno #173

Merged
merged 6 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 13 additions & 25 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* groovylint-disable DuplicateNumberLiteral, DuplicateStringLiteral, NestedBlockDepth */
/* groovylint-disable DuplicateNumberLiteral, DuplicateStringLiteral, GStringExpressionWithinString, NestedBlockDepth */
/* groovylint-disable-next-line CompileStatic */
DENO_IMAGE = 'denoland/deno:latest'
/* groovylint-disable-next-line GStringExpressionWithinString */
Expand Down Expand Up @@ -30,14 +30,14 @@ pipeline {
}
steps {
sh '''\
#!/bin/bash
#!/bin/bash

echo "Remove old test files"
find test -name ".*.json" -exec rm {} \\;
echo "Remove old test files"
find test -name ".*.json" -exec rm {} \\;

deno lint src
deno lint src

deno fmt --check src test
deno fmt --check src test
'''.stripIndent()
}
}
Expand All @@ -55,14 +55,13 @@ pipeline {
#!/bin/bash

deno test --coverage=.coverage --reporter junit --allow-read --allow-write test/* > .test.xml

deno coverage .coverage --lcov --output=.coverage.lcov
deno coverage .coverage --lcov --output=.cov_profile.lcov
'''.stripIndent()
}
post {
always {
junit '.test.xml'
stash(name: 'coverage', includes: '.coverage.lcov')
stash(name: 'coverage', includes: '.cov_profile.lcov')
}
}
}
Expand All @@ -77,21 +76,19 @@ pipeline {
label 'small'
}
}

steps {
// Unstash the .coverage.lcov file stashed in the 'Test' stage
// Unstash the .cov_profile.lcov file stashed in the 'Test' stage
unstash(name: 'coverage')

sh '''\
#!/bin/bash

# Convert LCOV to Cobertura XML
lcov_cobertura -b . -o coverage.xml .coverage.lcov
#!/bin/bash

# genhtml -o .coverageHTML .coverage.lcov
# Convert LCOV to Cobertura XML
lcov_cobertura --base-dir src --output coverage.xml .cov_profile.lcov
'''.stripIndent()

// Publish Cobertura report
// cobertura coberturaReportFile: 'coverage.xml'
recordCoverage(
tools: [[parser: 'COBERTURA', pattern: 'coverage.xml']],
id: 'Cobertura',
Expand All @@ -102,15 +99,6 @@ pipeline {
[threshold: 60.0, metric: 'BRANCH', baseline: 'PROJECT', unstable: true]
]
)
// Publish the HTML report
// publishHTML ([
// allowMissing: false,
// alwaysLinkToLastBuild: true,
// keepAll: true,
// reportDir: '.coverageHTML', // Point this to your coverage HTML directory
// reportFiles: 'index.html', // This could be your main HTML file
// reportName: "Coverage Report"
// ])
}
}
}
Expand Down
Empty file removed logback.log
Empty file.