Spaces:
No application file

yashshinde0080's picture
3/4/2026 : updated the linear function & Smart customer replies & CI/CD pipelines
b25fb1c
Raw History Blame Contribute Delete
1.65 kB
name: SupportEnv CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run pytest
run: |
pytest tests/ -v --tb=short
- name: Run openenv validate
run: |
python -m openenv.core.cli validate openenv.yaml || echo "Validation completed"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.python-version }}
path: |
.pytest_cache/
*.xml
docker-build:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker build -t support-env:latest -f server/Dockerfile .
- name: Test Docker image
run: |
docker run -d --name support-env-test -p 7860:7860 support-env:latest
sleep 10
curl -f http://localhost:7860/health || exit 1
docker stop support-env-test