Compare commits
20 Commits
4320570778
...
8e058aeefc
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e058aeefc | |||
| 8ab42fad20 | |||
| 40f934d542 | |||
| a537b1c468 | |||
| 19d55d6343 | |||
| bac3465172 | |||
| 8dd540e28a | |||
| 3aa31623bf | |||
| ff57d57fe9 | |||
| 88797e4c27 | |||
| ad458fe5d4 | |||
| 452285f62d | |||
| db48369879 | |||
| a4e228573f | |||
| 6d0b791afb | |||
| 2ef562785d | |||
| 745ec89048 | |||
| e6a8ca487b | |||
| 53bb25862c | |||
| 591cca959b |
@@ -2,58 +2,30 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, master ]
|
branches: [ main ]
|
||||||
pull_request:
|
|
||||||
branches: [ main, master ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Check system
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
uname -a
|
||||||
python -m pip install -e ".[dev]"
|
cat /etc/os-release 2>/dev/null | head -5
|
||||||
python -m pip install ruff mypy types-requests
|
- name: Install Python
|
||||||
|
|
||||||
- name: Run linting
|
|
||||||
run: python -m ruff check src/
|
|
||||||
|
|
||||||
- name: Run type checking
|
|
||||||
run: python -m mypy src/schema2mock/ || true
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: python -m pytest tests/unit/test_schema_parser.py tests/unit/test_generator.py tests/unit/test_composition.py tests/unit/test_config.py tests/unit/test_validator.py tests/integration/test_cli.py tests/integration/test_output.py tests/integration/test_server.py -v
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Install build dependencies
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
if ! command -v python3 &> /dev/null; then
|
||||||
python -m pip install build
|
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
|
curl -sSL https://www.python.org/ftp/python/3.11.0/python-3.11.0-linux-x86_64.tar.gz -o python.tar.gz
|
||||||
- name: Build package
|
tar -xzf python.tar.gz
|
||||||
run: |
|
export PATH="/app/python-3.11.0:$PATH"
|
||||||
python -m build
|
fi
|
||||||
|
python3 --version
|
||||||
- name: Upload artifacts
|
- name: Install deps
|
||||||
uses: actions/upload-artifact@v4
|
run: pip3 install -e ".[dev]"
|
||||||
with:
|
- name: Lint
|
||||||
name: dist
|
run: ruff check src/
|
||||||
path: dist/
|
- name: Type check
|
||||||
|
run: mypy src/
|
||||||
|
- name: Test
|
||||||
|
run: pytest tests/ -v
|
||||||
Reference in New Issue
Block a user