Skip to content

fix: use shared HTTP session and json_from_response across all controls #30

fix: use shared HTTP session and json_from_response across all controls

fix: use shared HTTP session and json_from_response across all controls #30

Workflow file for this run

name: Test Suite
on:
push:
branches:
- '**'
paths:
- 'flashforge/**/*.py'
- 'tests/**/*.py'
- 'pyproject.toml'
- 'requirements*.txt'
- '.github/workflows/test.yml'
pull_request:
branches:
- '**'
paths:
- 'flashforge/**/*.py'
- 'tests/**/*.py'
- 'pyproject.toml'
- 'requirements*.txt'
- '.github/workflows/test.yml'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.13']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests with pytest
run: |
python -m pytest -v --cov=flashforge --cov-report=term-missing
test-summary:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: Check test results
run: |
if [ "${{ needs.test.result }}" == "failure" ]; then
echo "Tests failed"
exit 1
elif [ "${{ needs.test.result }}" == "cancelled" ]; then
echo "Tests were cancelled"
exit 1
else
echo "All tests passed"
fi