refactor: statistical functions #951
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
# This workflow runs when a PR is opened, reopened, or synchronized or is called from | |
# another workflow. | |
# | |
# - Job 1 (test on ubuntu): | |
# - Set up the postgresql service. | |
# - Update and install non-pip packages (pygobject, etc.). | |
# - Set up the matrix of Python versions to test against. | |
# - Run the test suite with coverage for each Python version. | |
# - Upload the coverage results for each Python version to Codecov. | |
# - Create a coverage report for each Python version to use with Coveralls. | |
# - Job 2: | |
# - Aggregate and upload each Python's version coverage report for Coveralls. | |
# - Job 3 (test on windows): | |
name: Execute RAMSTK Test Suite with Coverage | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'dependabot/**' | |
- '!release/**' | |
- '!chore/**' | |
- "!docs/**" | |
paths: | |
- "**.py" | |
- "**.lock" | |
tags-ignore: | |
- "*" | |
pull_request: | |
paths: | |
- "**.py" | |
types: | |
- "opened" | |
- "reopened" | |
- "synchronize" | |
jobs: | |
ubuntu: | |
name: Run Test Suite on Linux | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Update and install system packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends apt-utils git libgirepository1.0-dev gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-pytest python3-numpy python3-scipy xauth xvfb | |
- name: Install RAMSTK and test with coverage | |
id: test | |
run: | | |
pip install -U pip setuptools>12.0 urllib3 hatch importlib_metadata | |
xvfb-run --auto-servernum hatch run test:cov | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./cobertura.xml | |
- name: Create Coveralls report | |
uses: miurahr/coveralls-python-action@patch-pyprject-toml | |
with: | |
parallel: true | |
upload_coveralls: | |
name: Upload Results to Coveralls | |
needs: ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload coverage report to Coveralls | |
uses: miurahr/coveralls-python-action@patch-pyprject-toml | |
with: | |
parallel-finished: true |