-
-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (52 loc) · 2.19 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
59
60
61
62
63
64
65
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 -e .[cli]
- 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: Print list domino src dir
run: |
ls ./src/domino
- name: Prepare and create cluster.
run: |
domino platform prepare --cluster-name=domino-cluster --workflows-repository=${{secrets.TESTS_WORKFLOWS_REPOSITORY}} --github-workflows-ssh-private-key='' --github-workflows-token=${{ secrets.TESTS_GITHUB_WORKFLOWS_TOKEN }} --github-default-pieces-repository-token=${{ secrets.TESTS_GITHUB_PIECES_TOKEN }} --deploy-mode=local-k8s-dev --local-pieces-repository-path=[] --local-domino-path='./src/domino' --local-rest-image='domino-rest:test' --local-frontend-image='' --local-airflow-image=''
domino platform create --install-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 --cov=rest --cov-report=xml --cov-report=term-missing rest/tests/ -v -s
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Delete cluster
run: kind delete cluster --name domino-cluster