updated testing workflow
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
name: Test Installation
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
uses: PozzettiAndrea/comfy-test/.github/workflows/test-matrix.yml@main
|
||||
with:
|
||||
config-file: "comfy-test.toml"
|
||||
@@ -1,59 +0,0 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, dev]
|
||||
pull_request:
|
||||
branches: [main, dev]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install -r tests/requirements-test.txt
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
pytest tests/ -m "unit" -v --tb=short --ignore=tests/browser_tests
|
||||
|
||||
- name: Run optional dependency tests
|
||||
continue-on-error: true
|
||||
run: |
|
||||
pytest tests/ -m "optional" -v --tb=short --ignore=tests/browser_tests
|
||||
|
||||
- name: Upload test outputs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-outputs-${{ matrix.os }}
|
||||
path: tests/outputs/
|
||||
retention-days: 7
|
||||
|
||||
- name: Generate coverage report
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
pip install pytest-cov
|
||||
pytest tests/ -m "unit" --cov=nodes --cov-report=xml --cov-report=html --ignore=tests/browser_tests
|
||||
|
||||
- name: Upload coverage
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
file: ./coverage.xml
|
||||
fail_ci_if_error: false
|
||||
Reference in New Issue
Block a user