From 169eac589bf2ff0a5a5e1071e7f7eabbfc684ee4 Mon Sep 17 00:00:00 2001 From: Jack Zhang Date: Fri, 8 May 2026 10:57:00 +0800 Subject: [PATCH] Update ci --- .github/workflows/ci.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccbcf51..172ba39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,8 @@ --- name: CI on: + schedule: + - cron: '0 0 * * 1' pull_request: push: branches: @@ -15,7 +17,7 @@ jobs: with: fetch-depth: 0 # needed for progressive mode to work - name: Run ansible-lint - uses: ansible/ansible-lint-action@v6 + uses: ansible/ansible-lint@v25.8.2 molecule: name: Molecule @@ -36,10 +38,10 @@ jobs: - name: Set up Python 3. uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.12' - name: Install test dependencies. - run: pip3 install ansible molecule molecule-plugins[docker] docker + run: pip3 install ansible==9.13.0 molecule molecule-plugins[docker] docker - name: Run Molecule tests. run: molecule test @@ -52,12 +54,12 @@ jobs: strategy: matrix: os: - - macos-13 - macos-14 + - macos-15 include: - - os: macos-13 - arch: intel - os: macos-14 + arch: intel + - os: macos-15 arch: arm steps: - name: Check out the codebase. @@ -66,36 +68,36 @@ jobs: - name: Set up Python 3. uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.12' - name: Install test dependencies. - run: pip3 install ansible molecule + run: pip3 install ansible==9.13.0 molecule==24.12.0 - name: Run Molecule tests. run: molecule test -s macos molecule-win: name: molecule-win - runs-on: windows-latest + runs-on: windows-2022 steps: - name: Check out the codebase. uses: actions/checkout@v4 - - uses: devops37/ssh-win-from-wsl@v1 + - uses: devops37/ssh-win-from-wsl@v2 - name: Install Python3 on wsl shell: wsl-bash {0} run: | sudo apt-get update sudo apt-get -y install python3 python3-pip - python3 -m pip install ansible molecule + python3 -m pip install --break-system-packages ansible==9.13.0 molecule==24.12.0 - name: Run Molecule tests. shell: wsl-bash {0} run: | ip route show cat /etc/resolv.conf - RUNNER_IP=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') + RUNNER_IP=$(ip route show | grep -i default | awk '{ print $3}') echo $RUNNER_IP sed -i "s/RUNNER_IP/$RUNNER_IP/g" molecule/windows/molecule.yml pwd