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
28 changes: 23 additions & 5 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ jobs:
end-to-end-tests:
permissions:
contents: read
if: |
github.event_name != 'schedule' ||
(matrix.branch == 'main' && github.event.schedule == '15 1 * * MON-FRI') ||
(matrix.branch == 'v2' && github.event.schedule == '15 2 * * MON-FRI')
strategy:
fail-fast: false
matrix:
Expand All @@ -31,24 +27,44 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: "Check schedule filter"
Comment thread
Jonas-Isr marked this conversation as resolved.
id: filter
run: |
if [ "${{ github.event_name }}" = "schedule" ]; then
if [ "${{ matrix.branch }}" = "main" ] && [ "${{ github.event.schedule }}" = "15 1 * * MON-FRI" ]; then
echo "run=true" >> $GITHUB_OUTPUT
elif [ "${{ matrix.branch }}" = "v2" ] && [ "${{ github.event.schedule }}" = "15 2 * * MON-FRI" ]; then
echo "run=true" >> $GITHUB_OUTPUT
else
echo "run=false" >> $GITHUB_OUTPUT
echo "Skipping: branch '${{ matrix.branch }}' does not match schedule '${{ github.event.schedule }}'"
fi
else
echo "run=true" >> $GITHUB_OUTPUT
fi

- name: "Checkout repository"
if: steps.filter.outputs.run == 'true'
uses: actions/checkout@v7
with:
ref: ${{ matrix.branch }}

- name: "Setup java"
if: steps.filter.outputs.run == 'true'
uses: actions/setup-java@v6.0.0
with:
distribution: "sapmachine"
java-version: ${{ env.JAVA_VERSION }}
cache: 'maven'

- name: "Build SDK"
if: steps.filter.outputs.run == 'true'
run: |
MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} clean install -DskipTests -DskipFormatting"
mvn $MVN_ARGS

- name: "Run tests"
if: steps.filter.outputs.run == 'true'
id: run_tests
run: |
if [ "${{ matrix.environment }}" = "canary" ]; then
Expand Down Expand Up @@ -85,6 +101,7 @@ jobs:
AI_CORE_CANARY: ${{ secrets.canary }}

- name: "Start Application Locally"
if: steps.filter.outputs.run == 'true'
run: |
if [ "${{ matrix.environment }}" = "canary" ]; then
export AICORE_SERVICE_KEY='${{ secrets.AI_CORE_CANARY }}'
Expand All @@ -109,11 +126,12 @@ jobs:
AI_CORE_CANARY: ${{ secrets.canary }}

- name: "Health Check"
if: steps.filter.outputs.run == 'true'
# print response body with headers to stdout. q:body only O:print -:stdout S:headers
run: wget -qO- -S localhost:8080

- name: "Slack Notification"
if: failure()
if: failure() && steps.filter.outputs.run == 'true'
uses: slackapi/slack-github-action@v4.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK }}
Expand Down
Loading