diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..61b0ec1 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,23 @@ +name: 'Run windup integration tests' + +on: + workflow_dispatch: + push: + pull_request: + +jobs: + run-windup-test: + name: Run windup tests + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v3 + - name: build base Dockerfile + run: docker build -f Dockerfile -t quay.io/konveyor/jdtls-server-base:testing . + - name: build testing Dockerfile + run: docker build -f test/Dockerfile -t testing . + - name: Run openshift tests + run: docker run -it testing test /windup-rulesets/rules/rules-reviewed/openshift + - name: Run azure tests + run: docker run -it testing test /windup-rulesets/rules/rules-reviewed/azure diff --git a/test/Dockerfile b/test/Dockerfile new file mode 100644 index 0000000..07c360a --- /dev/null +++ b/test/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.18 as builder + +WORKDIR /windup-shim +RUN git clone -b master --single-branch https://github.com/fabianvf/windup-rulesets-yaml.git /windup-shim +RUN go build -o windup-shim main.go + +WORKDIR /analyzer-lsp +RUN git clone -b main --single-branch https://github.com/konveyor/analyzer-lsp.git /analyzer-lsp +RUN make build + +FROM quay.io/konveyor/jdtls-server-base:testing + +COPY --from=builder /analyzer-lsp/konveyor-analyzer /usr/bin/konveyor-analyzer +COPY --from=builder /analyzer-lsp/provider_container_settings.json /analyzer-lsp/provider_settings.json + +RUN microdnf install git -y +RUN git clone -b master --depth=1 --progress --verbose --single-branch https://github.com/windup/windup-rulesets.git /windup-rulesets + +COPY --from=builder /windup-shim/windup-shim /usr/bin/windup-shim + +WORKDIR /windup-shim + +ENTRYPOINT ["windup-shim"]