Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
build:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/build.yml
e2e:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/e2e.yml
# Virtual job that can be configured as a required check before a PR can be merged.
all-required-checks-done:
name: All required checks done
Expand All @@ -40,6 +43,7 @@ jobs:
- test
- codeql
- build
- e2e
runs-on: ubuntu-latest
steps:
- run: echo "All required checks done"
95 changes: 95 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: End2End tests

on:
workflow_call:

permissions:
contents: read

jobs:
kind:
name: Kind
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Go
id: setup-go
uses: ./.github/actions/setup-go-cache
with:
cache-prefix: go-integration-kind

- name: Starting Armada cluster
run: make kind-all

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make kind-all installs the latest released Armada Operator Helm chart - https://github.com/armadaproject/armada-operator/blob/main/Makefile#L214
This way we run e2e tests for the latest released Operator, and in case of a change to Operator code or Helm chart, the e2e test won't cover that scenario.

I think it might be better to create a make kind-all-local or edit the make kind-all-dev to build the code and install from the local Helm chart.
That way we would cover the scenario to do an e2e test on current Operator code and on current Helm chart.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- name: Create queue
run: |
# Create queue
for second in {1..60}
do
if ./bin/app/armadactl create queue example 2> armadactl-${second}.log
then
if [[ second -eq 1 ]]
then
echo "Successfully created queue 'example'"
else
echo "Successfully created queue 'example' after ${second}s"
echo "Previously failed due to:"
cat armadactl-$((second-1)).log
fi
exit
fi
sleep 1
done

echo "Failed to create queue 'example' after ${second}s"
cat armadactl-${second}.log >&2
exit 1

- name: Test queue exists
run: |
# Test queue exists
for second in {1..60}
do
if ./bin/app/armadactl get queue example 2> armadactl-${second}.log
then
if [[ second -eq 1 ]]
then
echo "Successfully inspected queue 'example'"
else
echo "Successfully inspected queue 'example' after ${second}s"
echo "Previously failed due to:"
cat armadactl-$((second-1)).log
fi
exit
fi
sleep 1
done

echo "Failed to inspected queue 'example' after ${second}s"
cat armadactl-${second}.log >&2
exit 1

- name: Submit job
run: |
# Submit job
for second in {1..60}
do
if ./bin/app/armadactl submit dev/quickstart/example-job.yaml 2> armadactl-${second}.log
then
if [[ attempt -eq 1 ]]
then
echo "Successfully submitted job"
else
echo "Successfully submitted job after ${second}s"
echo "Previously failed due to:"
cat armadactl-$((second-1)).log
fi
exit
fi
sleep 1
done

echo "Failed to submitted job after ${second}s"
cat armadactl-${second}.log >&2
exit 1