Nightly Tests #810
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: Nightly Tests | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
default: master | ||
schedule: | ||
- cron: "0 6 * * 1-5" # runs at 6AM UTC (mon-fri) | ||
# pull_request: # uncomment this if you want to run nightly tests in your PR | ||
jobs: | ||
prep-testbed: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.5.0 | ||
- id: set-matrix | ||
run: | | ||
sudo apt-get install jq | ||
export value=$(bash scripts/get-all-test-paths.sh windows) | ||
echo "windows=$value" >> $GITHUB_OUTPUT | ||
outputs: | ||
windows: ${{ steps.set-matrix.outputs.windows }} | ||
windows-test: | ||
needs: prep-testbed | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
test-path: ${{fromJson(needs.prep-testbed.outputs.windows)}} | ||
steps: | ||
- uses: actions/checkout@v2.5.0 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- name: Prepare envionment | ||
run: | | ||
docker build -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip . | ||
python -m pip install --upgrade pip | ||
python -m pip install wheel | ||
pip install ".[all]" --no-cache-dir | ||
$env:PYTHONIOENCODING='utf-8' | ||
jina | ||
$env:JINA_LOG_LEVEL='ERROR' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Test | ||
id: test | ||
run: | | ||
$env:PYTHONIOENCODING='utf-8' | ||
pytest --suppress-no-test-exit-code --force-flaky --min-passes 1 --max-runs 5 --timeout=360 -v -s --ignore-glob='tests/integration/hub_usage/dummyhub*' ${{ matrix.test-path }} | ||
timeout-minutes: 20 | ||
env: | ||
JINAHUB_USERNAME: ${{ secrets.JINAHUB_USERNAME }} | ||
JINAHUB_PASSWORD: ${{ secrets.JINAHUB_PASSWORD }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- if: failure() | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
fields: eventName,job | ||
text: | | ||
:no_entry: pytest run for `${{ matrix.test-path }}` failed on :windows: | ||
author_name: Nightly tests | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NIGHTLY_TESTS_WEBHOOK }} | ||
MATRIX_CONTEXT: ${{ toJson(matrix) }} | ||
install-jina-ecosystem-test: | ||
runs-on: ubuntu-latest | ||
needs: [lint-flake-8, code-injection ] | ||
Check failure on line 77 in .github/workflows/nightly-tests.yml GitHub Actions / Nightly TestsInvalid workflow file
|
||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2.5.0 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Prepare enviroment | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install wheel | ||
HUBBLE_VERSION=$(curl -L -s "https://pypi.org/pypi/jina-hubble-sdk/json" | jq -r '.releases | keys | .[]| select(startswith("0."))' | 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-hubble-sdk==$HUBBLE_VERSION | ||
env: | ||
JINA_PIP_INSTALL_CORE: ${{ matrix.core }} | ||
JINA_PIP_INSTALL_PERF: ${{ matrix.perf }} | ||
- name: Test basic import | ||
run: python -c 'from jina import Executor,requests' | ||
- name: Test import all | ||
run: python -c 'from jina import *' | ||
success-all-test: | ||
needs: [prep-testbed, windows-test, install-jina-ecosystem-test] | ||
if: always() | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: technote-space/workflow-conclusion-action@v2 | ||
- name: Check Failure | ||
if: env.WORKFLOW_CONCLUSION == 'failure' | ||
run: exit 1 | ||
- name: Success | ||
if: ${{ success() }} | ||
run: echo "All Done" |