35 lines
2.0 KiB
YAML
35 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup repo
|
|
run: |
|
|
mkdir -p json_to_openapi tests examples
|
|
- name: Download setup.py
|
|
run: curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/setup.py -o setup.py
|
|
- name: Download pyproject.toml
|
|
run: curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/pyproject.toml -o pyproject.toml
|
|
- name: Download requirements.txt
|
|
run: curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/requirements.txt -o requirements.txt
|
|
- name: Download package files
|
|
run: |
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/json_to_openapi/__init__.py -o json_to_openapi/__init__.py
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/json_to_openapi/cli.py -o json_to_openapi/cli.py
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/json_to_openapi/analyzer.py -o json_to_openapi/analyzer.py
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/json_to_openapi/generator.py -o json_to_openapi/generator.py
|
|
- name: Download test files
|
|
run: |
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/tests/test_type_inference.py -o tests/test_type_inference.py
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/tests/test_schema_generator.py -o tests/test_schema_generator.py
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/tests/test_cli.py -o tests/test_cli.py
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/tests/test_integration.py -o tests/test_integration.py
|
|
curl -s https://gitea.com/7000pctAUTO/json-to-openapi/raw/branch/main/tests/__init__.py -o tests/__init__.py
|
|
- name: Install and test
|
|
run: |
|
|
pip3 install -e . pytest
|
|
pytest tests/ -v
|