Skip to content

✨ add testing workflow #6

✨ add testing workflow

✨ add testing workflow #6

Workflow file for this run

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
cp ./output/output.yaml ./test-data/analysis-output.yaml
cp ./output/dependencies.yaml ./test-data/deps-output.yaml
- name: Fail if analysis output does not match expected
run: |
git diff --exit-code ./test-data/analysis-output.yaml
- name: Fail if dependencies output does not match expected
run: |
git diff --exit-code ./test-data/deps-output.yaml