Skip to content
Merged
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
56 changes: 40 additions & 16 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,26 @@ jobs:
name: devsy-${{ steps.os.outputs.runner_os }}
path: dist/devsy-${{ steps.os.outputs.runner_os }}_*/devsy-${{ steps.os.outputs.runner_os }}-*

- name: build e2e test binary
if: matrix.runner == 'ubuntu-22.04' || matrix.runner == 'windows-latest'
shell: bash
working-directory: ./e2e
env:
CGO_ENABLED: 0
run: |
OUT="e2e.test"
if [ "${{ runner.os }}" == "Windows" ]; then
OUT="e2e.test.exe"
fi
go test -c -o "$OUT" ./
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: upload e2e test binary
if: matrix.runner == 'ubuntu-22.04' || matrix.runner == 'windows-latest'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: e2e-test-${{ steps.os.outputs.runner_os }}
path: ./e2e/e2e.test*

licenses:
name: Third-party licenses
needs: [changes, precommit, lint]
Expand Down Expand Up @@ -163,11 +183,6 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod

- name: get operating system lowercase
id: os
shell: bash
Expand All @@ -182,6 +197,12 @@ jobs:
path: ${{ runner.temp }}/devsy-bin/
merge-multiple: true

- name: download e2e test binary
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: e2e-test-${{ steps.os.outputs.runner_os }}
path: ./e2e/

- name: setup executable
shell: bash
working-directory: ./e2e
Expand All @@ -191,6 +212,7 @@ jobs:
mkdir -p ./bin/
find "$TEMP_DIR/devsy-bin/" -type f -name "devsy-*" -exec cp {} ./bin \;
find ./bin -name "devsy-*" -exec chmod +x {} \;
chmod +x ./e2e.test
ls -R ./bin/

- name: run test
Expand All @@ -201,7 +223,7 @@ jobs:
GH_ACCESS_TOKEN: ${{ github.token }}
GH_CREDENTIAL_USERNAME: x-access-token
run: |
go test -v -ginkgo.v -timeout 1500s --ginkgo.label-filter="${{ matrix.label }}"
./e2e.test -test.v -ginkgo.v -test.timeout 1500s --ginkgo.label-filter="${{ matrix.label }}"

integration-tests:
name: Test ${{ matrix.label }}${{ matrix.install-podman && format(' ({0})', matrix.install-podman) || '' }} on ${{ matrix.runner }}
Expand Down Expand Up @@ -427,12 +449,6 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'

- name: setup Go
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod

- name: install gnupg2
if: runner.os == 'Linux' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
run: sudo apt-get install -y gnupg2
Expand Down Expand Up @@ -464,6 +480,13 @@ jobs:
path: ${{ runner.temp }}/devsy-bin/
merge-multiple: true

- name: download e2e test binary
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: e2e-test-${{ steps.os.outputs.runner_os }}
path: ./e2e/

# e2e expects executable to have name defined in e2e/framework/framework.go
- name: setup executable
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
Expand All @@ -479,6 +502,9 @@ jobs:
mkdir -p ./bin/
find "$TEMP_DIR/devsy-bin/" -type f -name "devsy-*" -exec cp {} ./bin \;
find ./bin -name "devsy-*" -exec chmod +x {} \;
if [ "${{ runner.os }}" == "Linux" ]; then
chmod +x ./e2e.test
fi
ls -R ./bin/

- name: generate uuid
Expand Down Expand Up @@ -607,17 +633,15 @@ jobs:
KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}" \
${DOCKER_HOST:+DOCKER_HOST="${DOCKER_HOST}"} \
PATH="${PATH}" \
GOROOT="${GOROOT}" \
go test -v -ginkgo.v -timeout 1500s --ginkgo.label-filter="${{ matrix.label }}"
./e2e.test -test.v -ginkgo.v -test.timeout 1500s --ginkgo.label-filter="${{ matrix.label }}"
else
GH_USERNAME="${GH_USERNAME}" \
GH_ACCESS_TOKEN="${GH_ACCESS_TOKEN}" \
GH_CREDENTIAL_USERNAME="${GH_CREDENTIAL_USERNAME}" \
KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}" \
PATH="${PATH}" \
GOROOT="${GOROOT}" \
DOCKER_HOST="npipe:////./pipe/podman-machine-default" \
go test -v -ginkgo.v -timeout 1500s --ginkgo.label-filter="${{ matrix.label }}"
./e2e.test.exe -test.v -ginkgo.v -test.timeout 1500s --ginkgo.label-filter="${{ matrix.label }}"
fi

- name: verify docker is installed
Expand Down
Loading