From a7b181c3caf98aa1aed224b02b5c3c3da108241f Mon Sep 17 00:00:00 2001 From: laggardkernel Date: Mon, 6 Feb 2023 09:09:26 +0300 Subject: [PATCH 1/3] Fix link resolving in pyenv-versions Co-Authored-by: Ivan Pozdeev --- libexec/pyenv-versions | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libexec/pyenv-versions b/libexec/pyenv-versions index 3aaaa055..85f44085 100755 --- a/libexec/pyenv-versions +++ b/libexec/pyenv-versions @@ -112,7 +112,7 @@ print_version() { if [[ -L "$path" ]]; then # Only resolve the link itself for printing, do not resolve further. # Doing otherwise would misinform the user of what the link contains. - version_repr="$version --> $(resolve_link "$path")" + version_repr="$version --> $(readlink "$path")" else version_repr="$version" fi @@ -157,12 +157,12 @@ for path in "${versions_dir_entries[@]}"; do print_version "${path##*/}" "$path" # virtual environments created by anaconda/miniconda/pyenv-virtualenv if [[ -z $skip_envs ]]; then - for env_path in "${path}/envs/"*; do - if [ -d "${env_path}" ]; then - print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}" - fi - done - fi + for env_path in "${path}/envs/"*; do + if [ -d "${env_path}" ]; then + print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}" + fi + done + fi fi done shopt -u dotglob nullglob From f72c1712dc6c5253cd58265012fe79c7ea72151b Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Mon, 6 Feb 2023 15:38:20 +0300 Subject: [PATCH 2/3] CI: Test with native extension Only run tests for subcommands that use the native extension --- .github/workflows/pyenv_tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pyenv_tests.yml b/.github/workflows/pyenv_tests.yml index 5937d86d..0a34ef9c 100644 --- a/.github/workflows/pyenv_tests.yml +++ b/.github/workflows/pyenv_tests.yml @@ -42,3 +42,8 @@ jobs: echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH - run: | make test + - env: + PYENV_NATIVE_EXT: 1 + run: | + (cd src; ./configure; make) + bats/bin/bats test/{pyenv,hooks,versions}.bats \ No newline at end of file From a3f0bddc2a539615f58a709b2f19914b4fba2f1b Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Mon, 6 Feb 2023 15:44:59 +0300 Subject: [PATCH 3/3] CI: Migrate to checkout@v3 Actions runner warns about v2 deprecation --- .github/workflows/macos_build.yml | 2 +- .github/workflows/modified_scripts_build.yml | 6 +++--- .github/workflows/pyenv_tests.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 0722cc26..a56c3f7a 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -17,7 +17,7 @@ jobs: - "3.11" runs-on: macos-11 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Normally, we would use the superbly maintained... # - uses: actions/setup-python@v2 # with: diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index 8eff5360..93f49baa 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -6,7 +6,7 @@ jobs: outputs: versions: ${{steps.modified-versions.outputs.versions}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: git fetch origin "$GITHUB_BASE_REF" - shell: bash run: > @@ -30,7 +30,7 @@ jobs: os: ["macos-11", "macos-12"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: | #envvars export PYENV_ROOT="$GITHUB_WORKSPACE" @@ -90,7 +90,7 @@ jobs: os: ["ubuntu-20.04", "ubuntu-22.04"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: | #envvars export PYENV_ROOT="$GITHUB_WORKSPACE" diff --git a/.github/workflows/pyenv_tests.yml b/.github/workflows/pyenv_tests.yml index 0a34ef9c..dc905d14 100644 --- a/.github/workflows/pyenv_tests.yml +++ b/.github/workflows/pyenv_tests.yml @@ -16,7 +16,7 @@ jobs: - macos-11 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Normally, we would use the superbly maintained... # - uses: actions/setup-python@v2 # with: diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 1061586d..cb701ff1 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -17,7 +17,7 @@ jobs: - "3.11" runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Normally, we would use the superbly maintained... # - uses: actions/setup-python@v2 # with: