-
-
Notifications
You must be signed in to change notification settings - Fork 14
58 lines (46 loc) · 1.88 KB
/
integration-tests-api.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
53
54
55
56
57
58
name: Create Kind cluster and run Domino API tests
on:
push:
branches:
- main
- dev
- test/*
jobs:
api-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Domino.
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Build REST image.
uses: docker/build-push-action@v3
with:
push: false
tags: domino-rest:test
context: rest
file: rest/Dockerfile
- name: Install k8s Kind.
uses: helm/[email protected]
with:
install_only: true
- name: Prepare and create cluster.
run: |
domino platform prepare --cluster-name=domino-cluster --workflows-repository=${{secrets.TESTS_WORKFLOWS_REPOSITORY}} --github-workflows-ssh-private-key=None --github-workflows-token=${{ secrets.TESTS_GITHUB_WORKFLOWS_TOKEN }} --github-default-pieces-repository-token=${{ secrets.TESTS_GITHUB_PIECES_TOKEN }} --deploy-mode=local-k8s --local-pieces-repository-path=[] --local-domino-path=''
domino platform create --domino-rest-image=domino-rest:test --run-airflow=False
- name: Install tests dependencies.
run: pip install -r rest/requirements-test.txt
- name: Setup kubectl.
uses: azure/setup-kubectl@v3
- name: Wait pods to be ready.
run: python rest/tests/utils/kubernetes.py
- name: Run tests.
env:
DOMINO_DEFAULT_PIECES_REPOSITORY_TOKEN: ${{ secrets.TESTS_GITHUB_PIECES_TOKEN }}
DOMINO_GITHUB_ACCESS_TOKEN_WORKFLOWS: ${{ secrets.TESTS_GITHUB_WORKFLOWS_TOKEN }}
DOMINO_GITHUB_WORKFLOWS_REPOSITORY: ${{secrets.TESTS_WORKFLOWS_REPOSITORY}}
run: pytest rest/tests/ -v
- name: Delete cluster
run: kind delete cluster --name domino-cluster