46 lines
966 B
YAML
46 lines
966 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -e .
|
|
pip install pytest
|
|
pip list
|
|
|
|
- name: Run tests
|
|
run: |
|
|
ls -la tests/unit/
|
|
python -c "from mockapi.core.generators import DataGenerator; print('Import successful')"
|
|
pytest tests/unit/test_generators.py -v --tb=short
|
|
|
|
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.11'
|
|
|
|
- name: Build package
|
|
run: |
|
|
pip install build
|
|
python -m build |