Skip to content

Commit

Permalink
Merge branch 'main' into feature-python-build
Browse files Browse the repository at this point in the history
  • Loading branch information
staticdev authored Jan 7, 2024
2 parents 0f18d5c + 03f6451 commit 7b4ce30
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 48 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pip==23.1.2
ansible==8.1.0
yamllint==1.32.0
ansible-lint==6.17.2
pip==23.3.2
ansible==9.1.0
yamllint==1.33.0
ansible-lint==6.22.1
4 changes: 2 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4.1.0
uses: crazy-max/ghaction-github-labeler@v5.0.0
with:
skip-delete: true
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
draft_release:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.24.0
- uses: release-drafter/release-drafter@v5.25.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Upgrade pip
run: |
Expand All @@ -45,10 +45,12 @@ jobs:
pip install --constraint=.github/workflows/constraints.txt ansible
- name: Trigger a new import on Galaxy.
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_TOKEN }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
- name: Publish the release notes
uses: release-drafter/release-drafter@v5.24.0
uses: release-drafter/release-drafter@v5.25.0
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: "staticdev.pyenv"

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install test dependencies
run: pip install --constraint=.github/workflows/constraints.txt ansible yamllint ansible-lint
Expand All @@ -50,14 +50,14 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: "staticdev.pyenv"

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Upgrade pip
run: |
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Install test dependencies
run: |
python3 -m pip install --constraint=.github/workflows/constraints.txt ansible 'molecule-plugins[podman]' podman
python3 -m pip install --constraint=.github/workflows/constraints.txt ansible 'molecule-plugins[podman]'
- name: Run Molecule tests
run: molecule test
Expand Down
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,30 @@ None.
- hosts: servers
roles:
- role: staticdev.pyenv
pyenv_version: "v2.3.9"
pyenv_virtualenv_version: "v1.1.5"
pyenv_update_version: "810db78"
pyenv_shellrc_file: "{{ ansible_env.HOME }}/.shrc"
pyenv_path: "{{ ansible_env.HOME }}/.pyenv"
pyenvrc_path: "{{ ansible_env.HOME }}"
pyenv_owner: "{{ instance_owner }}"
pyenv_global:
- 3.11.4
- 3.10.12
pyenv_enable_autocompletion: false
pyenv_python_versions:
- 3.11.4
- 3.10.12
pyenv_virtualenvs:
- venv_name: latest_v311
py_version: 3.11.4
- venv_name: latest_v310
py_version: 3.10.12
pyenv_make_opts: "-j4"
pyenv_python_configure_opts: "--enable-optimizations --with-lto --with-ensurepip=upgrade"
pyenv_python_cflags: "-march=native -mtune=native"
pyenv_profile_task: "-m test.regrtest --pgo -j0"
vars:
pyenv_version: "v2.3.9"
pyenv_virtualenv_version: "v1.1.5"
pyenv_update_version: "810db78"
pyenv_shellrc_file: "{{ ansible_env.HOME }}/.shrc"
pyenv_path: "{{ ansible_env.HOME }}/.pyenv"
pyenvrc_path: "{{ ansible_env.HOME }}"
pyenv_owner: "{{ instance_owner }}"
pyenv_global:
- 3.11.4
- 3.10.12
pyenv_enable_autocompletion: false
pyenv_python_versions:
- 3.11.4
- 3.10.12
pyenv_virtualenvs:
- venv_name: latest_v311
py_version: 3.11.4
- venv_name: latest_v310
py_version: 3.10.12
pyenv_make_opts: "-j4"
pyenv_python_configure_opts: "--enable-optimizations --with-lto --with-ensurepip=upgrade"
pyenv_python_cflags: "-march=native -mtune=native"
pyenv_profile_task: "-m test.regrtest --pgo -j0"
```
## License
Expand Down
2 changes: 1 addition & 1 deletion current-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.1
2.10.2
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ driver:
name: podman
platforms:
- name: instance
image: "docker.io/geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
image: "docker.io/geerlingguy/docker-${MOLECULE_DISTRO:-debian12}-ansible:latest"
command: ${MOLECULE_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
2 changes: 1 addition & 1 deletion molecule/multi-version/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ driver:
name: podman
platforms:
- name: instance
image: "docker.io/geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
image: "docker.io/geerlingguy/docker-${MOLECULE_DISTRO:-debian12}-ansible:latest"
command: ${MOLECULE_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand Down
9 changes: 6 additions & 3 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
- name: "Set pyenv global {{ pyenv_global }}"
ansible.builtin.shell: . {{ pyenvrc_path }}/.pyenvrc && pyenv global {{ pyenv_global | join(' ') }} && pyenv rehash
changed_when: true
when:
- _pyenv_globals_file.stat.exists
- (_pyenv_globals_file_content.content | b64decode | split('\n') | select() | list) != pyenv_global
when: >
(
_pyenv_globals_file.stat.exists
and (_pyenv_globals_file_content.content | b64decode | split('\n') | select() | list) != pyenv_global
)
or not _pyenv_globals_file.stat.exists

0 comments on commit 7b4ce30

Please sign in to comment.