-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (55 loc) · 2.07 KB
/
style-and-test-check.yml
File metadata and controls
58 lines (55 loc) · 2.07 KB
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: Style and test check
on:
pull_request:
jobs:
style-lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v3
with:
python-version: 3.7
- name: Install requirements
run: make init
- name: Lint with flake8, black and isort
run: make style
- name: Run tests
run: make test
env:
JINA_AUTH_TOKEN: ${{secrets.JINA_AUTH_TOKEN}}
- name: Run payment tests
run: JINA_HUBBLE_REGISTRY=https://apihubble.staging.jina.ai make test-payment
env:
STRIPE_SECRET_KEY: ${{secrets.STRIPE_SECRET_KEY}}
M2M_TOKEN: ${{secrets.M2M_TOKEN}}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
install-jina-ecosystem-test:
runs-on: ubuntu-latest
needs: [style-lint-test]
strategy:
fail-fast: false
steps:
- uses: actions/[email protected]
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Prepare environment
run: |
python -m pip install --upgrade pip
python -m pip install wheel
JINA_VERSION=$(curl -L -s "https://pypi.org/pypi/jina/json" | jq -r '.releases | keys | .[]| select(startswith("3."))' | sort -V | tail -1)
DOCARRAY_VERSION=$(curl -L -s "https://pypi.org/pypi/docarray/json" | jq -r '.releases | keys | .[]| select(startswith("0."))' | sort -V | tail -1)
JCLOUD_VERSION=$(curl -L -s "https://pypi.org/pypi/jcloud/json" | jq -r '.releases | keys | .[]| select(startswith("0."))' | sort -V | tail -1)
pip install . jcloud==$JCLOUD_VERSION docarray==$DOCARRAY_VERSION jina==$JINA_VERSION
- name: Test basic import
run: python -c 'from jina import Executor,requests'
- name: Test import all
run: |
python -c 'from jina import *'
python -c 'from hubble import *'
python -c 'from docarray import *'