LATRt Updates #2717
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' | |
- '.github/dependabot.yml' | |
workflow_call: | |
jobs: | |
test: | |
name: pytest with coverage | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Install system packages | |
run: | | |
sudo apt-get install -y socat | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
# Install | |
- name: Install so3g | |
run: | | |
pip3 install so3g | |
- name: clone socs | |
uses: actions/checkout@v4 | |
- name: Install socs | |
run: | | |
pip3 install -r requirements.txt | |
pip3 install -e . | |
# Unit Tests | |
- name: Run unit tests | |
working-directory: ./tests | |
run: | | |
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest' | |
- name: Build docker test images | |
run: | | |
docker compose build socs | |
# Integration Tests | |
- name: Run integration tests | |
working-directory: ./tests | |
run: | | |
COVERAGE_FILE=.coverage.int python3 -m pytest --cov -m 'integtest' | |
# Coverage | |
- name: Report test coverage | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv ./tests/.coverage.* ./ | |
pip install -U coveralls | |
coverage combine | |
coverage report | |
coveralls --service=github |