Replace deprecated threading.currentThread
#649
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**.rst' | |
- '**.md' | |
- '.flake8' | |
- '.pre-commit-config.yaml' | |
- '.readthedocs.yaml' | |
workflow_call: | |
jobs: | |
test: | |
name: pytest with coverage | |
runs-on: ubuntu-latest | |
steps: | |
# Setup | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
# Install | |
- name: clone ocs | |
uses: actions/checkout@v4 | |
- name: Install ocs | |
run: | | |
pip3 install -r requirements.txt | |
pip3 install -e .[so3g] | |
# Unit Tests | |
- name: Run unit tests | |
working-directory: ./tests | |
run: | | |
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest' | |
# Integration Tests | |
- name: Build images for integration tests | |
run: | | |
docker compose build ocs ocs-crossbar | |
- name: Run integration tests | |
working-directory: ./tests | |
run: | | |
mkdir log | |
COVERAGE_FILE=.coverage.int python3 -m pytest --cov -m 'integtest' | |
ls -la ./log/ | |
# Coverage | |
- name: Report test coverage | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv ./tests/.coverage.* ./ | |
pip install coveralls | |
coverage combine | |
coverage report | |
coveralls --service=github |