-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (55 loc) · 1.84 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
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]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get Artifact Name
id: artifact
run: |
ARTIFACT=$(make help | grep 'Artifact: ')
echo "name=${ARTIFACT#'Artifact: '}" >> $GITHUB_OUTPUT
- name: Install and configure microk8s
run: |
make microk8s
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: charmed-spark
path: charmed-spark
- name: Run tests
run: |
# Unpack Artifact
mv charmed-spark/${{ steps.artifact.outputs.name }} .
rmdir charmed-spark
# Import artifact into docker with new tag
sudo make import TARGET=docker REPOSITORY=ghcr.io/canonical/ PREFIX=test- \
-o ${{ steps.artifact.outputs.name }}
# Import artifact into microk8s to be used in integration tests
sudo make import TARGET=microk8s PREFIX=test- REPOSITORY=ghcr.io/canonical/ \
-o $(find .make_cache -name "*.tag")
sg microk8s -c "make tests"
- name: Run tests (Jupyter)
run: |
# Import artifact into docker with new tag
sudo make import \
FLAVOUR=jupyter TARGET=microk8s \
TAG=$(yq .version rockcraft.yaml) \
REPOSITORY=ghcr.io/canonical/ PREFIX=test- \
-o $(find .make_cache -name "*.tag")
sg microk8s -c "make tests FLAVOUR=jupyter"