-
Notifications
You must be signed in to change notification settings - Fork 8
94 lines (79 loc) · 3.25 KB
/
integration.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
name: Spark Image Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
workflow_call:
jobs:
build-rock:
uses: ./.github/workflows/build.yaml
integration:
runs-on: ubuntu-latest
timeout-minutes: 120
needs: build-rock
strategy:
matrix:
env: [integration]
k8s_version: ["1.28-strict/stable","1.29-strict/stable", "1.30-strict/stable" ]
fail-fast: false
env:
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Artifact Name
id: artifact
run: |
BASE_ARTIFACT=$(make help | grep 'Artifact: ')
echo "base_artifact_name=${BASE_ARTIFACT#'Artifact: '}" >> $GITHUB_OUTPUT
JUPYTER_ARTIFACT=$(make help FLAVOUR=jupyter | grep 'Artifact: ')
echo "jupyter_artifact_name=${JUPYTER_ARTIFACT#'Artifact: '}" >> $GITHUB_OUTPUT
KYUUBI_ARTIFACT=$(make help FLAVOUR=kyuubi | grep 'Artifact: ')
echo "kyuubi_artifact_name=${KYUUBI_ARTIFACT#'Artifact: '}" >> $GITHUB_OUTPUT
GPU_ARTIFACT=$(make help FLAVOUR=spark-gpu | grep 'Artifact: ')
echo "gpu_artifact_name=${GPU_ARTIFACT#'Artifact: '}" >> $GITHUB_OUTPUT
- name: Install and configure microk8s
run: |
make microk8s-setup MICROK8S_CHANNEL=${{ matrix.k8s_version }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: charmed-spark
path: charmed-spark
- name: Run tests
run: |
# Unpack Artifact
mv charmed-spark/${{ steps.artifact.outputs.base_artifact_name }} .
# Import artifact into microk8s to be used in integration tests
sudo make microk8s-import PREFIX=test- REPOSITORY=ghcr.io/canonical/ \
-o ${{ steps.artifact.outputs.base_artifact_name }}
sg snap_microk8s -c "make tests"
- name: Run tests (Jupyter)
run: |
# Unpack Artifact
mv charmed-spark/${{ steps.artifact.outputs.jupyter_artifact_name }} .
# Import artifact into docker with new tag
sudo make microk8s-import \
FLAVOUR=jupyter \
TAG=$(yq .version images/charmed-spark/rockcraft.yaml) \
REPOSITORY=ghcr.io/canonical/ \
PREFIX=test- \
-o ${{ steps.artifact.outputs.jupyter_artifact_name }}
sg snap_microk8s -c "make tests FLAVOUR=jupyter"
- name: Run tests (Kyuubi)
env:
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
run: |
# Unpack Artifact
mv charmed-spark/${{ steps.artifact.outputs.kyuubi_artifact_name }} .
rmdir charmed-spark
# Import artifact into docker with new tag
sudo make microk8s-import \
FLAVOUR=kyuubi \
TAG=$(yq .version images/charmed-spark/rockcraft.yaml) \
REPOSITORY=ghcr.io/canonical/ PREFIX=test- \
-o ${{ steps.artifact.outputs.kyuubi_artifact_name }}
sg snap_microk8s -c "make tests FLAVOUR=kyuubi"