Skip to content

HTTP server init, run and stop test #161

HTTP server init, run and stop test

HTTP server init, run and stop test #161

Workflow file for this run

name: Unit Tests For Development
on:
workflow_dispatch:
pull_request:
branches:
- main
- main-next-release
push:
branches:
- main
- main-next-release
jobs:
test:
strategy:
matrix:
include:
# Define specific Python versions for each OS
- os: ubuntu-latest
python-version: 3.11
# - os: windows-latest
# python-version: 3.11
# - os: macos-latest
# python-version: 3.11
- os: ubuntu-latest
python-version: 3.12
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r tests/requirements.txt
- name: Run unit tests and generate coverage report
run: |
pip install coverage
coverage run -m unittest discover -s tests -p 'test_*.py'
coverage report -m
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-next-release:
strategy:
matrix:
include:
# Define specific Python versions for each OS
- os: ubuntu-latest
python-version: 3.11
# - os: windows-latest
# python-version: 3.11
# - os: macos-latest
# python-version: 3.11
- os: ubuntu-latest
python-version: 3.12
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/main-next-release'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r tests/requirements.txt
- name: Run unit tests and generate coverage report
run: |
pip install coverage
coverage run -m unittest discover -s tests -p 'test_*.py'
coverage report -m