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

#246 Upload self tracing report #333

Merged
merged 9 commits into from
Aug 14, 2022
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ jobs:
uses: actions/upload-artifact@v3
if: ${{ env.DEFAULT_JAVA == matrix.java }}
with:
name: oft
name: openfasttrace-binaries
path: product/target/openfasttrace-*.jar

- name: Trace requirements
- name: Run self-trace
run: ./oft-self-trace.sh

- name: Upload self-tracing report
uses: actions/upload-artifact@v3
with:
name: self-tracing-report
path: target/self-trace-report.html
if-no-files-found: error
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The most basic variant to run OpenFastTrace is directly from the JAR file via th
java -jar product/target/openfasttrace-2.3.5.jar trace /path/to/directory/being/traced
```

If you want to run OFT automatically as part of a continuous build, we recommend using our [Gradle Plugin](https://github.com/itsallcode/openfasttrace-gradle).
If you want to run OFT automatically as part of a continuous build, we recommend using our plugins for [Gradle](https://github.com/itsallcode/openfasttrace-gradle) and [Maven](https://github.com/itsallcode/openfasttrace-maven-plugin).

For more details about how to run OFT please consult the [user guide](doc/user_guide.md).

Expand Down
2 changes: 2 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added support for C# files with postfix `.cs` [#326](https://github.com/itsallcode/openfasttrace/issues/326) / [PR #327](https://github.com/itsallcode/openfasttrace/pull/327)
- Added support for Robot Framework with postfix `.robot` [#302](https://github.com/itsallcode/openfasttrace/issues/302) / [PR #332](https://github.com/itsallcode/openfasttrace/pull/332)
- Upload self-tracing report to GitHub Action result [#246](https://github.com/itsallcode/openfasttrace/issues/246) / [PR #333](https://github.com/itsallcode/openfasttrace/pull/333)

### Refactoring

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.itsallcode.openfasttrace.importer.tag;



import static java.util.stream.Collectors.toList;

import java.util.Arrays;
Expand Down Expand Up @@ -34,6 +35,7 @@ public class TagImporterFactory extends ImporterFactory
"php", // PHP
"pl", "pm", // Perl
"py", // Python
"robot", // Robot Framework
"pu", "puml", "plantuml", // PlantUML
"r", // R Language
"rs", // Rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected List<String> getSupportedFilenames()
"foo.htm", "foo.html", "foo.ini", "foo.js", "foo.json", "foo.lua", "foo.m",
"foo.mm", "foo.php", "foo.pl", "foo.pls", "foo.pm", "foo.py", "foo.sql", "foo.r",
"foo.rs", "foo.sh", "foo.yaml", "foo.xhtml", "foo.zsh", "foo.clj", "foo.kt", "foo.scala",
"foo.pu", "foo.puml", "foo.plantuml", "foo.go");
"foo.pu", "foo.puml", "foo.plantuml", "foo.go", "foo.robot");
}

@Override
Expand Down
13 changes: 11 additions & 2 deletions oft-self-trace.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/sh
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

script_path=$(dirname "$(readlink -f "$0")")
base_dir="$script_path"
oft_script="$base_dir/oft"
report_file=$base_dir/target/self-trace-report.html

mkdir -p $(dirname "$report_file")

$oft_script trace "$base_dir/doc/spec" \
$oft_script trace \
--output-format html -f "$report_file" \
"$base_dir/doc/spec" \
"$base_dir/importer/markdown/src" \
"$base_dir/importer/specobject/src" \
"$base_dir/importer/zip/src" \
Expand Down