Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ runs:
run: |
# Container might not be Debian-based
if ! command -v apt-get &> /dev/null; then exit 0; fi
apt-get update -y
apt-get install -y --no-install-recommends curl
rm -rf /var/lib/apt/lists/*
if ! command -v curl &> /dev/null; then
apt-get update -y
apt-get install -y --no-install-recommends curl
fi

- name: Install system dependencies
if: inputs.minimal == 'false'
shell: bash
run: |
# Container might not be Debian-based
if ! command -v apt-get &> /dev/null; then exit 0; fi
apt-get update
[ -d /var/lib/apt/lists/partial ] || apt-get update
apt-get install -y --no-install-recommends \
libglu1-mesa \
libglut3.12 \
Expand All @@ -61,26 +62,26 @@ runs:
libxcursor1 \
libxft2 \
libxinerama1
rm -rf /var/lib/apt/lists/*

- name: Ensure NodeJS
shell: bash
run: |
if command -v node &> /dev/null; then exit 0; fi
# Container is Debian-based (apt)
if command -v apt-get &> /dev/null; then
apt-get update -y
[ -d /var/lib/apt/lists/partial ] || apt-get update -y
apt-get install -y --no-install-recommends nodejs
rm -rf /var/lib/apt/lists/*
fi
# Container Fedora-based (dnf)
if command -v dnf &> /dev/null; then
dnf makecache
dnf update -y
dnf install -y node
dnf install -y --nodocs nodejs
fi

# Slim images do not contain NodeJS
- uses: astral-sh/[email protected]
with:
enable-cache: 'true'

# - name: Install uv
# shell: bash
Expand All @@ -99,13 +100,12 @@ runs:

if [[ "${{ inputs.minimal }}" != "true" ]]; then
# Regression checks needs NRG Gmsh, pre-install it (try GitHub latest release asset first, then GitLab mirrors)
uv pip install --no-cache-dir https://github.com/hopr-framework/PyHOPE/releases/latest/download/gmsh-${GMSH_VERSION}-py3-none-linux_x86_64.whl || \
uv pip install --no-cache-dir https://gitlab.iag.uni-stuttgart.de/libs/python-gmsh/-/raw/master/gmsh-${GMSH_VERSION}-py3-none-linux_x86_64.whl || \
uv pip install --no-cache-dir https://piclas.boltzplatz.eu/public-libs/python-gmsh/-/raw/master/gmsh-${GMSH_VERSION}-py3-none-linux_x86_64.whl
uv pip install --no-cache-dir -e .
uv pip install https://github.com/hopr-framework/PyHOPE/releases/latest/download/gmsh-${GMSH_VERSION}-py3-none-linux_x86_64.whl || \
uv pip install https://gitlab.iag.uni-stuttgart.de/libs/python-gmsh/-/raw/master/gmsh-${GMSH_VERSION}-py3-none-linux_x86_64.whl || \
uv pip install https://piclas.boltzplatz.eu/public-libs/python-gmsh/-/raw/master/gmsh-${GMSH_VERSION}-py3-none-linux_x86_64.whl
uv pip install -e .
fi

if [[ "${{ inputs.coverage }}" == "true" ]]; then
uv pip install --no-cache-dir coverage
rm -rf /var/lib/apt/lists/*
fi
uv pip install coverage
fi
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- shell: bash
run: |
source .venv/bin/activate
uv pip --no-cache-dir install ty
uv pip install ty
ty --version
ty check --color always --project pyhope pyhope

Expand Down
13 changes: 6 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repos:
# Run the linter
- id: ruff
name: ruff [linter]
args: [--config=pyproject.toml, --preview]
# Run the formatter
# - id: ruff-format
# name: ruff formatter
Expand All @@ -24,16 +25,14 @@ repos:
- id: vulture
name: vulture [dead code]

# ty has no official pre-commit hook yet (https://github.com/astral-sh/ty/issues/269).
# Run it as a local hook using the system-installed binary
- repo: local
- repo: https://github.com/astral-sh/ty-pre-commit
# Ty version
rev: v0.0.83
hooks:
# Run the type checker
- id: ty
name: ty [type checker]
entry: ty check --color always --project pyhope pyhope
language: system
pass_filenames: false
types: [python]
args: [--color=always, --project=pyhope]

- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.2
Expand Down
Loading