diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b6f63cd..fb39a2d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,7 @@ jobs: python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] exclude: [ + { platform: macos-latest, python-version: "3.8" }, { platform: macos-latest, python-version: "3.9" }, { platform: macos-latest, python-version: "3.10" }, { platform: macos-latest, python-version: "3.11" }, diff --git a/install b/install index f7b27c4..cff4658 100755 --- a/install +++ b/install @@ -109,6 +109,17 @@ required_commands() { havecmd git || return $? } +ci_realpath() { + if ci; then + if [[ "$OSTYPE" == "darwin"* ]]; then + # need to use g-prefixed things on CI + grealpath "$@" + return $? + fi + fi + realpath "$@" +} + setup_fork() { local FORK_ABBREV UPSTREAM_URL UPSTREAM_DIR echo 'Setting up upstream fork...' | maybe_boxes @@ -116,7 +127,7 @@ setup_fork() { FORK_ABBREV="${HPI_UPSTREAM_FOLDER_NAME:-HPI-karlicoss}" UPSTREAM_URL='https://github.com/karlicoss/HPI' - UPSTREAM_DIR="$(realpath "../${FORK_ABBREV}")" + UPSTREAM_DIR="$(ci_realpath "../${FORK_ABBREV}")" # clone my fork one level up from here if it does not exist if [[ ! -e "${UPSTREAM_DIR}" ]]; then @@ -172,7 +183,7 @@ module_dependencies() { } ci_config() { - CONF="$(realpath "${BASE_DIR}/tests/my")" || return $? + CONF="$(ci_realpath "${BASE_DIR}/tests/my")" || return $? MY_CONFIG="${CONF}" python3 -m my.core config check 1>&2 || return $? echo "${CONF}" } @@ -212,7 +223,7 @@ main() { install_dependencies || prompt_if_fails || return $? required_commands || prompt_if_fails || return $? # use realpath to make sure BASE_DIR is set properly - BASE_DIR="$(realpath "${BASE_DIR}")" || return $? + BASE_DIR="$(ci_realpath "${BASE_DIR}")" || return $? (setup_fork) || prompt_if_fails || return $? module_dependencies || prompt_if_fails || return $? ci_run || return $? diff --git a/tests/my/my/config/__init__.py b/tests/my/my/config/__init__.py index 0653ffe..8f82b68 100644 --- a/tests/my/my/config/__init__.py +++ b/tests/my/my/config/__init__.py @@ -2,7 +2,6 @@ Config file used for testing in CI; so that config is defined """ - import tempfile from pathlib import Path from typing import Optional, Sequence, Callable