-
Notifications
You must be signed in to change notification settings - Fork 114
52 lines (44 loc) · 1.67 KB
/
ci.yml
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
name: Krane CI
on: [push]
jobs:
ruby-tests:
runs-on: ubuntu-latest
name: "Tests - Ruby ${{ matrix.ruby }} with Kubernetes ${{ matrix.kubernetes_version }}"
strategy:
fail-fast: false
matrix:
ruby:
- "3.2.2"
- "3.1.2"
- "3.0.4"
- "2.7.6"
kubernetes_version:
- "1.26.4"
- "1.24.13"
- "1.23.17"
include:
- kubernetes_version: "1.26.4"
kind_image: "kindest/node:v1.26.4@sha256:a539833d26264444ab3b8f5e56e23fa3361436445fa23c864e6dec622458858f"
- kubernetes_version: "1.24.13"
kind_image: "kindest/node:v1.24.13@sha256:c9e00e2b228e47ba3c96eaf0309b27dc3f73e444944e4c900016fd07b1b805cb"
- kubernetes_version: "1.23.17"
kind_image: "kindest/node:v1.23.17@sha256:eb33093b461ffee7614ca65a39ac0fb57982e1407dc38df4df92811c4fbcb687"
steps:
- uses: actions/checkout@v3
- name: Setup Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup kubectl ${{ matrix.kubernetes_version }}
run: |
mkdir -p "${GITHUB_WORKSPACE}/bin"
curl -o "${GITHUB_WORKSPACE}/bin/kubectl" -LO "https://dl.k8s.io/release/v${{ matrix.kubernetes_version }}/bin/linux/amd64/kubectl"
chmod +x "${GITHUB_WORKSPACE}/bin/kubectl"
echo "PATH=$GITHUB_WORKSPACE/bin:${PATH}" >> $GITHUB_ENV
- name: Create kind cluster for ${{ matrix.kubernetes_version }}
run: |
kind create cluster --image=${{ matrix.kind_image }}
- name: Run tests
run: |
bin/test