K8s integration tests #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: ["*"] | |
paths: | |
- "src/**" | |
- "test/**" | |
- "Project.toml" | |
- ".github/workflows/CI.yaml" | |
pull_request: | |
paths: | |
- "src/**" | |
- "test/**" | |
- "Project.toml" | |
- ".github/workflows/CI.yaml" | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
unit-test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.runs-on }} - ${{ matrix.arch }} - ${{ matrix.threads}} threads | |
# These permissions are needed to: | |
# - Delete old caches: https://github.com/julia-actions/cache#cache-retention | |
permissions: | |
actions: write | |
contents: read | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1.6" # Earliest version of Julia that the package is compatible with | |
- "1" # Latest Julia release | |
runs-on: | |
- ubuntu-latest | |
arch: | |
- x64 | |
threads: | |
- 1 | |
env: | |
RUN_TESTS: unit,quality-assurance | |
JULIA_NUM_THREADS: ${{ matrix.threads }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v1 | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: lcov.info | |
integration-test: | |
name: Integration Test - Julia ${{ matrix.julia-version }} - K8s ${{ matrix.k8s-version }} - minikube ${{ matrix.minikube-version }} | |
# These permissions are needed to: | |
# - Delete old caches: https://github.com/julia-actions/cache#cache-retention | |
permissions: | |
actions: write | |
contents: read | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
julia-version: | |
- "1" | |
# Support the latest versions of the supported releases: https://kubernetes.io/releases/. | |
# These must be full version numbers including the patch. | |
k8s-version: | |
# - "1.27.11" | |
# - "1.28.7" | |
- "1.29.2" | |
# https://github.com/kubernetes/minikube/releases | |
minikube-version: | |
- "1.32.0" | |
env: | |
RUN_TESTS: integration | |
SKAFFOLD_INTERACTIVE: "false" # Disable survey prompts | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.julia-version }} | |
- uses: julia-actions/cache@v1 | |
- uses: yokawasa/[email protected] | |
with: | |
setup-tools: |- | |
kubectl | |
skaffold | |
kubectl: "1.29.2" # https://github.com/kubernetes/kubernetes/releases | |
skaffold: "2.10.1" # https://github.com/GoogleContainerTools/skaffold/releases | |
# https://skaffold.dev/docs/resources/telemetry/ | |
- name: Disable Skaffold telemetry | |
run: skaffold config set --global collect-metrics false | |
# Factors influencing the setup of the local Kubernetes cluster: | |
# - Limited resources on GitHub runners only allow running a 1 pod at a time with | |
# the default minikube install (additional pods are stuck as "Pending") | |
# - minikube restricts max CPUs per node to the number of CPUs on the host | |
- name: Set up minikube | |
uses: manusa/[email protected] | |
with: | |
minikube version: v${{ matrix.minikube-version }} | |
kubernetes version: v${{ matrix.k8s-version }} | |
driver: docker | |
# start args: --nodes=1 --cni=kindnet | |
- name: Build image | |
env: | |
JULIA_VERSION: ${{ matrix.julia-version }} | |
run: skaffold build | |
working-directory: test/integration | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: lcov.info |