Merge branch 'dev' of https://github.com/Tauffer-Consulting/domino in… #185
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/kind-action@v1.4.0 | |
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 rest/tests/ -v | |
- name: Delete cluster | |
run: kind delete cluster --name domino-cluster |