generated from konveyor-ecosystem/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix relative paths, add CI test (#37)
* ✨ minor fixes Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com> * ✨ add testing workflow Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com> --------- Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
- Loading branch information
1 parent
49a4ef7
commit c9aa8af
Showing
8 changed files
with
2,975 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Demo Testing | ||
|
||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build image and binary | ||
run: | | ||
podman build -t localhost/kantra:latest -f Dockerfile . | ||
go build -o kantra main.go | ||
- name: Fetch sample applications | ||
run: | | ||
git clone https://github.com/konveyor/example-applications | ||
git clone https://github.com/ivargrimstad/jakartaee-duke | ||
- name: Run analysis test and copy output | ||
run: | | ||
RUNNER_IMG=localhost/kantra:latest ./kantra analyze --input $(pwd)/example-applications/example-1/ --output ./output/ --target cloud-readiness | ||
- name: Fail if analysis output does not match expected | ||
run: | | ||
expected_file=./test-data/analysis-output.yaml | ||
actual_file=./output/output.yaml | ||
sed 's/^[ \t-]*//' $expected_file | sort > /tmp/expected_file | ||
sed 's/^[ \t-]*//' $actual_file | sort > /tmp/actual_file | ||
diff /tmp/expected_file /tmp/actual_file || diff $expected_file $actual_file | ||
- name: Fail if dependencies output does not match expected | ||
run: | | ||
expected_file=./test-data/deps-output.yaml | ||
actual_file=./output/dependencies.yaml | ||
sed 's/^[ \t-]*//' $expected_file | sort > /tmp/expected_file | ||
sed 's/^[ \t-]*//' $actual_file | sort > /tmp/actual_file | ||
diff /tmp/expected_file /tmp/actual_file || diff $expected_file $actual_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.