Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: E2E

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Provision cluster
uses: agynio/bootstrap/.github/actions/provision@main

- name: Setup DevSpace
uses: agynio/e2e/.github/actions/setup-devspace@main

- name: Deploy authorization from source
run: devspace dev

- name: Run E2E tests
uses: agynio/e2e/.github/actions/run-tests@main
with:
service: authorization
51 changes: 1 addition & 50 deletions devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ version: v2beta1

vars:
AUTHORIZATION_NAMESPACE: platform
E2E_IMAGE: ghcr.io/agynio/devcontainer-go:1

functions:
disable_argocd_sync: |-
Expand Down Expand Up @@ -38,7 +37,7 @@ functions:
emptyDir: {}
containers:
- name: authorization
image: ghcr.io/agynio/devcontainer-go:1 # keep in sync with E2E_IMAGE
image: ghcr.io/agynio/devcontainer-go:1 # dev container for source deploy
workingDir: /opt/app/data
command:
- sh
Expand Down Expand Up @@ -75,26 +74,6 @@ functions:
EOF
)"

deployments:
e2e-runner:
namespace: ${AUTHORIZATION_NAMESPACE}
helm:
chart:
name: component-chart
repo: https://charts.devspace.sh
values:
containers:
- image: ${E2E_IMAGE}
env:
- name: AUTHORIZATION_ADDRESS
value: "authorization:50051"
labels:
app.kubernetes.io/name: authorization-e2e

commands:
test:e2e: |-
devspace run-pipeline test:e2e $@

pipelines:
dev:
flags:
Expand Down Expand Up @@ -125,20 +104,6 @@ pipelines:
stop_dev authorization
fi

test:e2e:
run: |-
create_deployments e2e-runner
start_dev e2e-runner &
sleep 5
exec_container \
--label-selector "app.kubernetes.io/name=authorization-e2e" \
-n ${AUTHORIZATION_NAMESPACE} \
-- bash -c 'cd /opt/app/data && buf generate buf.build/agynio/api --path agynio/api/authorization/v1 && go test -v -count=1 -tags e2e ./test/e2e/'
EXIT_CODE=$?
stop_dev e2e-runner
purge_deployments e2e-runner
exit $EXIT_CODE

hooks:
- name: restore-argocd-auto-sync
events:
Expand Down Expand Up @@ -179,17 +144,3 @@ dev:
lastLines: 200
ports:
- port: "50051"

e2e-runner:
namespace: ${AUTHORIZATION_NAMESPACE}
labelSelector:
app.kubernetes.io/name: authorization-e2e
command: ["sleep", "infinity"]
workingDir: /opt/app/data
sync:
- path: ./:/opt/app/data
excludePaths:
- .git/
- .devspace/
- /.gen/
- /tmp/
Loading