Skip to content

Commit b82adf4

Browse files
committed
ci-build: uncomment e2e
1 parent 41bdd1b commit b82adf4

1 file changed

Lines changed: 154 additions & 154 deletions

File tree

.github/workflows/ci-build.yaml

Lines changed: 154 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -397,158 +397,158 @@ jobs:
397397
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
398398
# uses: SonarSource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
399399
# if: env.sonar_secret != ''
400-
# test-e2e:
401-
# name: Run end-to-end tests
402-
# if: ${{ needs.changes.outputs.backend == 'true' }}
403-
# runs-on: ubuntu-22.04
404-
# strategy:
405-
# fail-fast: false
406-
# matrix:
407-
# k3s:
408-
# - version: v1.31.0
409-
# # We designate the latest version because we only collect code coverage for that version.
410-
# latest: true
411-
# - version: v1.30.4
412-
# latest: false
413-
# - version: v1.29.8
414-
# latest: false
415-
# - version: v1.28.13
416-
# latest: false
417-
# needs:
418-
# - build-go
419-
# - changes
420-
# env:
421-
# GOPATH: /home/runner/go
422-
# ARGOCD_FAKE_IN_CLUSTER: "true"
423-
# ARGOCD_SSH_DATA_PATH: "/tmp/argo-e2e/app/config/ssh"
424-
# ARGOCD_TLS_DATA_PATH: "/tmp/argo-e2e/app/config/tls"
425-
# ARGOCD_E2E_SSH_KNOWN_HOSTS: "../fixture/certs/ssh_known_hosts"
426-
# ARGOCD_E2E_K3S: "true"
427-
# ARGOCD_IN_CI: "true"
428-
# ARGOCD_E2E_APISERVER_PORT: "8088"
429-
# ARGOCD_APPLICATION_NAMESPACES: "argocd-e2e-external,argocd-e2e-external-2"
430-
# ARGOCD_SERVER: "127.0.0.1:8088"
431-
# GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
432-
# GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
433-
# steps:
434-
# - name: Free Disk Space (Ubuntu)
435-
# uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
436-
# with:
437-
# large-packages: false
438-
# docker-images: false
439-
# swap-storage: false
440-
# tool-cache: false
441-
# - name: Checkout code
442-
# uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
443-
# - name: Setup Golang
444-
# uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
445-
# with:
446-
# go-version: ${{ env.GOLANG_VERSION }}
447-
# - name: GH actions workaround - Kill XSP4 process
448-
# run: |
449-
# sudo pkill mono || true
450-
# - name: Install K3S
451-
# env:
452-
# INSTALL_K3S_VERSION: ${{ matrix.k3s.version }}+k3s1
453-
# run: |
454-
# set -x
455-
# curl -sfL https://get.k3s.io | sh -
456-
# sudo chmod -R a+rw /etc/rancher/k3s
457-
# sudo mkdir -p $HOME/.kube && sudo chown -R runner $HOME/.kube
458-
# sudo k3s kubectl config view --raw > $HOME/.kube/config
459-
# sudo chown runner $HOME/.kube/config
460-
# sudo chmod go-r $HOME/.kube/config
461-
# kubectl version
462-
# - name: Restore go build cache
463-
# uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
464-
# with:
465-
# path: ~/.cache/go-build
466-
# key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
467-
# - name: Add ~/go/bin to PATH
468-
# run: |
469-
# echo "/home/runner/go/bin" >> $GITHUB_PATH
470-
# - name: Add /usr/local/bin to PATH
471-
# run: |
472-
# echo "/usr/local/bin" >> $GITHUB_PATH
473-
# - name: Add ./dist to PATH
474-
# run: |
475-
# echo "$(pwd)/dist" >> $GITHUB_PATH
476-
# - name: Download Go dependencies
477-
# run: |
478-
# go mod download
479-
# go install github.com/mattn/goreman@latest
480-
# - name: Install all tools required for building & testing
481-
# run: |
482-
# make install-test-tools-local
483-
# - name: Setup git username and email
484-
# run: |
485-
# git config --global user.name "John Doe"
486-
# git config --global user.email "john.doe@example.com"
487-
# - name: Pull Docker image required for tests
488-
# run: |
489-
# docker pull ghcr.io/dexidp/dex:v2.41.1
490-
# docker pull argoproj/argo-cd-ci-builder:v1.0.0
491-
# docker pull redis:7.0.15-alpine
492-
# - name: Create target directory for binaries in the build-process
493-
# run: |
494-
# mkdir -p dist
495-
# chown runner dist
496-
# - name: Run E2E server and wait for it being available
497-
# timeout-minutes: 30
498-
# run: |
499-
# set -x
500-
# # Something is weird in GH runners -- there's a phantom listener for
501-
# # port 8080 which is not visible in netstat -tulpen, but still there
502-
# # with a HTTP listener. We have API server listening on port 8088
503-
# # instead.
504-
# make start-e2e-local COVERAGE_ENABLED=true 2>&1 | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" > /tmp/e2e-server.log &
505-
# count=1
506-
# until curl -f http://127.0.0.1:8088/healthz; do
507-
# sleep 10;
508-
# if test $count -ge 180; then
509-
# echo "Timeout"
510-
# exit 1
511-
# fi
512-
# count=$((count+1))
513-
# done
514-
# - name: Run E2E testsuite
515-
# run: |
516-
# set -x
517-
# make test-e2e-local
518-
# goreman run stop-all || echo "goreman trouble"
519-
# sleep 30
520-
# - name: Upload e2e coverage report
521-
# uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
522-
# with:
523-
# name: e2e-code-coverage
524-
# path: /tmp/coverage
525-
# if: ${{ matrix.k3s.latest }}
526-
# - name: Upload e2e-server logs
527-
# uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
528-
# with:
529-
# name: e2e-server-k8s${{ matrix.k3s.version }}.log
530-
# path: /tmp/e2e-server.log
531-
# if: ${{ failure() }}
400+
test-e2e:
401+
name: Run end-to-end tests
402+
if: ${{ needs.changes.outputs.backend == 'true' }}
403+
runs-on: ubuntu-22.04
404+
strategy:
405+
fail-fast: false
406+
matrix:
407+
k3s:
408+
- version: v1.31.0
409+
# We designate the latest version because we only collect code coverage for that version.
410+
latest: true
411+
- version: v1.30.4
412+
latest: false
413+
- version: v1.29.8
414+
latest: false
415+
- version: v1.28.13
416+
latest: false
417+
needs:
418+
- build-go
419+
- changes
420+
env:
421+
GOPATH: /home/runner/go
422+
ARGOCD_FAKE_IN_CLUSTER: "true"
423+
ARGOCD_SSH_DATA_PATH: "/tmp/argo-e2e/app/config/ssh"
424+
ARGOCD_TLS_DATA_PATH: "/tmp/argo-e2e/app/config/tls"
425+
ARGOCD_E2E_SSH_KNOWN_HOSTS: "../fixture/certs/ssh_known_hosts"
426+
ARGOCD_E2E_K3S: "true"
427+
ARGOCD_IN_CI: "true"
428+
ARGOCD_E2E_APISERVER_PORT: "8088"
429+
ARGOCD_APPLICATION_NAMESPACES: "argocd-e2e-external,argocd-e2e-external-2"
430+
ARGOCD_SERVER: "127.0.0.1:8088"
431+
GITHUB_TOKEN: ${{ secrets.E2E_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
432+
GITLAB_TOKEN: ${{ secrets.E2E_TEST_GITLAB_TOKEN }}
433+
steps:
434+
- name: Free Disk Space (Ubuntu)
435+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
436+
with:
437+
large-packages: false
438+
docker-images: false
439+
swap-storage: false
440+
tool-cache: false
441+
- name: Checkout code
442+
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
443+
- name: Setup Golang
444+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
445+
with:
446+
go-version: ${{ env.GOLANG_VERSION }}
447+
- name: GH actions workaround - Kill XSP4 process
448+
run: |
449+
sudo pkill mono || true
450+
- name: Install K3S
451+
env:
452+
INSTALL_K3S_VERSION: ${{ matrix.k3s.version }}+k3s1
453+
run: |
454+
set -x
455+
curl -sfL https://get.k3s.io | sh -
456+
sudo chmod -R a+rw /etc/rancher/k3s
457+
sudo mkdir -p $HOME/.kube && sudo chown -R runner $HOME/.kube
458+
sudo k3s kubectl config view --raw > $HOME/.kube/config
459+
sudo chown runner $HOME/.kube/config
460+
sudo chmod go-r $HOME/.kube/config
461+
kubectl version
462+
- name: Restore go build cache
463+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
464+
with:
465+
path: ~/.cache/go-build
466+
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
467+
- name: Add ~/go/bin to PATH
468+
run: |
469+
echo "/home/runner/go/bin" >> $GITHUB_PATH
470+
- name: Add /usr/local/bin to PATH
471+
run: |
472+
echo "/usr/local/bin" >> $GITHUB_PATH
473+
- name: Add ./dist to PATH
474+
run: |
475+
echo "$(pwd)/dist" >> $GITHUB_PATH
476+
- name: Download Go dependencies
477+
run: |
478+
go mod download
479+
go install github.com/mattn/goreman@latest
480+
- name: Install all tools required for building & testing
481+
run: |
482+
make install-test-tools-local
483+
- name: Setup git username and email
484+
run: |
485+
git config --global user.name "John Doe"
486+
git config --global user.email "john.doe@example.com"
487+
- name: Pull Docker image required for tests
488+
run: |
489+
docker pull ghcr.io/dexidp/dex:v2.41.1
490+
docker pull argoproj/argo-cd-ci-builder:v1.0.0
491+
docker pull redis:7.0.15-alpine
492+
- name: Create target directory for binaries in the build-process
493+
run: |
494+
mkdir -p dist
495+
chown runner dist
496+
- name: Run E2E server and wait for it being available
497+
timeout-minutes: 30
498+
run: |
499+
set -x
500+
# Something is weird in GH runners -- there's a phantom listener for
501+
# port 8080 which is not visible in netstat -tulpen, but still there
502+
# with a HTTP listener. We have API server listening on port 8088
503+
# instead.
504+
make start-e2e-local COVERAGE_ENABLED=true 2>&1 | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" > /tmp/e2e-server.log &
505+
count=1
506+
until curl -f http://127.0.0.1:8088/healthz; do
507+
sleep 10;
508+
if test $count -ge 180; then
509+
echo "Timeout"
510+
exit 1
511+
fi
512+
count=$((count+1))
513+
done
514+
- name: Run E2E testsuite
515+
run: |
516+
set -x
517+
make test-e2e-local
518+
goreman run stop-all || echo "goreman trouble"
519+
sleep 30
520+
- name: Upload e2e coverage report
521+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
522+
with:
523+
name: e2e-code-coverage
524+
path: /tmp/coverage
525+
if: ${{ matrix.k3s.latest }}
526+
- name: Upload e2e-server logs
527+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
528+
with:
529+
name: e2e-server-k8s${{ matrix.k3s.version }}.log
530+
path: /tmp/e2e-server.log
531+
if: ${{ failure() }}
532532

533-
# # workaround for status checks -- check this one job instead of each individual E2E job in the matrix
534-
# # this allows us to skip the entire matrix when it doesn't need to run while still having accurate status checks
535-
# # see:
536-
# # https://github.com/argoproj/argo-workflows/pull/12006
537-
# # https://github.com/orgs/community/discussions/9141#discussioncomment-2296809
538-
# # https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
539-
# test-e2e-composite-result:
540-
# name: E2E Tests - Composite result
541-
# if: ${{ always() }}
542-
# needs:
543-
# - test-e2e
544-
# - changes
545-
# runs-on: ubuntu-22.04
546-
# steps:
547-
# - run: |
548-
# result="${{ needs.test-e2e.result }}"
549-
# # mark as successful even if skipped
550-
# if [[ $result == "success" || $result == "skipped" ]]; then
551-
# exit 0
552-
# else
553-
# exit 1
554-
# fi
533+
# workaround for status checks -- check this one job instead of each individual E2E job in the matrix
534+
# this allows us to skip the entire matrix when it doesn't need to run while still having accurate status checks
535+
# see:
536+
# https://github.com/argoproj/argo-workflows/pull/12006
537+
# https://github.com/orgs/community/discussions/9141#discussioncomment-2296809
538+
# https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
539+
test-e2e-composite-result:
540+
name: E2E Tests - Composite result
541+
if: ${{ always() }}
542+
needs:
543+
- test-e2e
544+
- changes
545+
runs-on: ubuntu-22.04
546+
steps:
547+
- run: |
548+
result="${{ needs.test-e2e.result }}"
549+
# mark as successful even if skipped
550+
if [[ $result == "success" || $result == "skipped" ]]; then
551+
exit 0
552+
else
553+
exit 1
554+
fi

0 commit comments

Comments
 (0)