-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (119 loc) · 3.98 KB
/
CI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
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.6" # Earliest version of Julia that the package is compatible with
- "1" # Latest Julia release
# 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
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
helm
kubectl: "1.29.2" # https://github.com/kubernetes/kubernetes/releases
helm: "3.14.2" # https://github.com/helm/helm/releases
# 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
# Fix these warnings: https://github.com/helm/helm/issues/9115
- name: Fix kube config permissions
run: |
chmod go-r ~/.kube/config
helm version
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info