Skip to content

Commit

Permalink
Use nicer names like x64 and arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
valentijnscholten committed Feb 26, 2025
1 parent 5487fdf commit 69df59c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build-docker-images-for-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,32 @@ on:
# inspired by https://github.com/orgs/community/discussions/26801 we take the runs-on as parameter so we can run arm64 on native hardwarde
workflow_dispatch:
inputs:
runner:
platform:
type: string
default: "ubuntu-latest"
default: "x64"
workflow_call:
inputs:
runner:
platform:
type: string
default: "ubuntu-latest"
default: "x64"

jobs:
build:
name: Build Docker Images
runs-on: ${{ inputs.runner }}
runs-on: ${{ inputs.platform == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
strategy:
matrix:
# integration tests are only build (and run) on debian x64
docker-image: [django, nginx, integration-tests]
os: [alpine, debian]
runner: ["${{ inputs.runner }}"]
platform: ["${{ inputs.platform }}"]
exclude:
- docker-image: integration-tests
os: alpine
- docker-image: integration-tests
runner: ubuntu-24.04-arm
platform: arm64

steps:
- name: Show Platform
run: echo Runner value for this run = ${{ inputs.runner }}

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
- name: Load docker images
timeout-minutes: 10
run: |-
docker load -i built-docker-image/nginx-${{ matrix.os }}-ubuntu-latest_img
docker load -i built-docker-image/django-${{ matrix.os }}-ubuntu-latest_img
docker load -i built-docker-image/integration-tests-debian-ubuntu-latest_img
docker load -i built-docker-image/nginx-${{ matrix.os }}-x64_img
docker load -i built-docker-image/django-${{ matrix.os }}-x64_img
docker load -i built-docker-image/integration-tests-debian-x64_img
docker images
- name: Set integration-test mode
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/k8s-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
timeout-minutes: 15
run: |-
eval $(minikube docker-env)
docker load -i built-docker-image/nginx-${{ matrix.os }}-ubuntu-latest_img
docker load -i built-docker-image/django-${{ matrix.os }}-ubuntu-latest_img
docker load -i built-docker-image/nginx-${{ matrix.os }}-x64_img
docker load -i built-docker-image/django-${{ matrix.os }}-x64_img
docker images
- name: Configure HELM repos
Expand All @@ -75,7 +75,7 @@ jobs:
echo "redis=${{ env.HELM_REDIS_BROKER_SETTINGS }}" >> $GITHUB_ENV
- name: Deploying Django application with ${{ matrix.databases }} ${{ matrix.brokers }}
timeout-minutes: 15
timeout-minutes: 15
run: |-
helm install \
--timeout 800s \
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rest-framework-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Rest Framework Unit Tests
on:
workflow_call:
inputs:
runner:
platform:
type: string
default: "ubuntu-latest"
default: "x64"

jobs:
unit_tests:
name: Rest Framework Unit Tests
runs-on: ${{ inputs.runner }}
runs-on: ${{ inputs.platform == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}

strategy:
matrix:
Expand All @@ -33,8 +33,8 @@ jobs:
- name: Load docker images
timeout-minutes: 10
run: |-
docker load -i built-docker-image/nginx-${{ matrix.os }}-${{ inputs.runner }}_img
docker load -i built-docker-image/django-${{ matrix.os }}-${{ inputs.runner }}_img
docker load -i built-docker-image/nginx-${{ matrix.os }}-${{ inputs.platform }}_img
docker load -i built-docker-image/django-${{ matrix.os }}-${{ inputs.platform }}_img
docker images
# run tests with docker compose
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ jobs:
build-docker-containers:
strategy:
matrix:
runner: ["ubuntu-latest", "ubuntu-24.04-arm"] # we need to pass runner names instead of amd64/amd64
platform: ['x64', 'arm64']
fail-fast: false
uses: ./.github/workflows/build-docker-images-for-testing.yml
secrets: inherit
with:
runner: ${{ matrix.runner }}
platform: ${{ matrix.platform }}

test-rest-framework:
strategy:
matrix:
runner: ["ubuntu-latest", "ubuntu-24.04-arm"]
platform: ['x64', 'arm64']
fail-fast: false
needs: build-docker-containers
uses: ./.github/workflows/rest-framework-tests.yml
secrets: inherit
with:
runner: ${{ matrix.runner}}
platform: ${{ matrix.platform}}

# only run integration tests on ubuntu-latest (x64)
# only run integration tests for x64 (default)
test-user-interface:
needs: build-docker-containers
uses: ./.github/workflows/integration-tests.yml
secrets: inherit

# only run k8s tests on ubuntu-latest (x64)
# only run k8s tests for x64 (default)
test-k8s:
needs: build-docker-containers
uses: ./.github/workflows/k8s-tests.yml
Expand Down

0 comments on commit 69df59c

Please sign in to comment.