Skip to content

Commit

Permalink
Separate testing of mathrace_interaction directory in a standalone CI…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
francesco-ballarin committed Feb 11, 2024
1 parent 27662d2 commit 07882b0
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 74 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/ci.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/mathrace_interaction_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: mathrace-interaction CI

on:
push:
branches:
- "**"
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * MON"
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
container: debian:12
defaults:
run:
working-directory: mathrace_interaction
steps:
- name: Install git
run: |
export DEBIAN_FRONTEND="noninteractive"
apt update -y -q
apt install -y -qq git
working-directory: .
- uses: actions/checkout@v4
with:
submodules: true
- name: Install non-pip dependencies of the community projects scripts library
run: |
export DEBIAN_FRONTEND="noninteractive"
apt install -y -qq python3-pip
rm /usr/lib/python3.*/EXTERNALLY-MANAGED
- name: Install the mathrace-interaction library
run: |
python3 -m pip install .[docs,lint,tests]
- name: Clean build files
run: |
git config --global --add safe.directory $PWD
git clean -xdf
working-directory: .
- name: Run ruff
run: |
python3 -m ruff .
- name: Run isort
run: |
python3 -m isort --check --diff .
- name: Run mypy
run: |
python3 -m mypy .
- name: Run yamllint
run: |
python3 -m yamllint -d "{ignore: turing, extends: default, rules: {document-start: {present: false}, line-length: disable, truthy: {check-keys: false}}}" ../.github
- name: Run documentation generation
run: |
cd docs && python3 -m sphinx -W -b html . build/html
- name: Run tests
run: |
python3 -m coverage run --source=mathrace_interaction -m pytest -svv tests/unit
- name: Check test coverage
run: |
python3 -m coverage report --fail-under=100 --show-missing --skip-covered
warn:
runs-on: ubuntu-latest
if: github.repository == 'dmf-unicatt/turing-dmf' && github.ref == 'refs/heads/main' && github.event_name == 'schedule'
steps:
- name: Warn if scheduled workflow is about to be disabled
uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main
with:
workflow-filename: mathrace_interaction_ci.yml
days-elapsed: 50
10 changes: 10 additions & 0 deletions mathrace_interaction/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*~
*.bak
*.cache
*.egg
*.egg-info
*.py[cod]
.coverage
.pytest_cache
build
dist
13 changes: 8 additions & 5 deletions mathrace_interaction/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ maintainers = [
{name = "Francesco Ballarin", email = "[email protected]"},
]
description = "Interfacing mathrace and turing"
license = {file = "../LICENSE"}
license = {text = "GNU Affero General Public License v3 or later (AGPLv3+)"}
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
Expand All @@ -32,9 +32,9 @@ classifiers = [
dependencies = []

[project.urls]
homepage = "https://github.com/dmf-unicatt/turing-docker"
repository = "https://github.com/dmf-unicatt/turing-docker"
issues = "https://github.com/dmf-unicatt/turing-docker/issues"
homepage = "https://github.com/dmf-unicatt/turing-dmf"
repository = "https://github.com/dmf-unicatt/turing-dmf"
issues = "https://github.com/dmf-unicatt/turing-dmf/issues"
funding = "https://github.com/sponsors/francesco-ballarin"

[project.optional-dependencies]
Expand All @@ -47,7 +47,7 @@ lint = [
"ruff",
"yamllint"
]
unit_tests = [
tests = [
"coverage[toml]",
"pytest"
]
Expand Down Expand Up @@ -83,3 +83,6 @@ max-doc-length = 120

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.setuptools.packages.find]
namespaces = false

0 comments on commit 07882b0

Please sign in to comment.