forked from Shopify/krane
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.44 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
name: Krane CI
on: [push]
jobs:
ruby-tests:
runs-on: ubuntu-latest
name: "Tests (${{matrix.test_suite}}) - Ruby ${{ matrix.ruby }} with Kubernetes ${{ matrix.kubernetes_version }}"
strategy:
fail-fast: false
matrix:
ruby:
- "3.2.2"
kubernetes_version:
- "1.23.17"
test_suite:
- "unit_test"
- "cli_test"
- "serial_integration_test"
- "integration_test"
include:
- 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 ${{matrix.test_suite}}