Skip to content

WIP

WIP #39

Workflow file for this run

name: test.yaml
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
container:
image: python
steps:
- name: Check out git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fix
run: git config --global --add safe.directory '*'
- name: Install dependencies
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
run: pip3 install poetry flake8 black && poetry config virtualenvs.create ${USE_VENV} && poetry install
#
# - name: flake8
# run: flake8 --max-line-length=120 .
- name: black
run: black --preview --check .
test_fields:
needs:
- lint
runs-on: ubuntu-latest
container:
image: python:3.8
steps:
- name: Check out git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fix
run: git config --global --add safe.directory '*'
- name: Install dependencies
run: pip3 install poetry pytest-asyncio && poetry config virtualenvs.create false && poetry install
- name: Test
env:
FMA_APIKEY: ${{ secrets.FMA_APIKEY }}
run: pytest tests/test_fields.py --tb=short
test_unknown_error_handle:
needs:
- lint
- test_fields
runs-on: ubuntu-latest
container:
image: python:3.8
steps:
- name: Check out git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fix
run: git config --global --add safe.directory '*'
- name: Install dependencies
run: pip3 install poetry pytest-asyncio && poetry config virtualenvs.create false && poetry install
- name: Test
env:
FMA_APIKEY: ${{ secrets.FMA_APIKEY }}
run: pytest tests/test_unknown_error_handle.py --tb=short
test_flymyai_client:
needs:
- lint
- test_unknown_error_handle
runs-on: ubuntu-latest
container:
image: python:3.8
steps:
- name: Check out git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fix
run: git config --global --add safe.directory '*'
- name: Install dependencies
run: pip3 install poetry pytest-asyncio && poetry config virtualenvs.create false && poetry install
- name: Test
env:
FMA_APIKEY: ${{ secrets.FMA_APIKEY }}
run: pytest tests/test_flymyai_client.py --tb=short
test_stream:
needs:
- lint
- test_unknown_error_handle
runs-on: ubuntu-latest
container:
image: python:3.8
steps:
- name: Check out git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fix
run: git config --global --add safe.directory '*'
- name: Install dependencies
run: pip3 install poetry pytest-asyncio && poetry config virtualenvs.create false && poetry install
- name: Test
env:
FMA_APIKEY: ${{ secrets.FMA_APIKEY }}
run: pytest tests/test_stream.py --tb=short
test_async_inference:
needs:
- lint
- test_unknown_error_handle
runs-on: ubuntu-latest
container:
image: python:3.8
steps:
- name: Check out git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fix
run: git config --global --add safe.directory '*'
- name: Install dependencies
run: pip3 install poetry pytest-asyncio && poetry config virtualenvs.create false && poetry install
- name: Test
env:
FMA_APIKEY: ${{ secrets.FMA_APIKEY }}
run: pytest tests/test_async_inference.py --tb=short
test_m1_clients:
needs:
- lint
runs-on: ubuntu-latest
container:
image: python:3.8
steps:
- name: Check out git repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fix
run: git config --global --add safe.directory '*'
- name: Install dependencies
run: pip3 install poetry pytest-asyncio && poetry config virtualenvs.create false && poetry install
- name: Test
run: pytest tests/test_flymyai_m1_client.py --tb=short