From 1008fc144f083c016895c92be140602ef13ac5bd Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 20 Dec 2023 21:34:36 -0300 Subject: [PATCH] PR checks: Use latest version of Github Actions Update the usage of Github actions to the latest available version. --- .github/workflows/ansible-test.yml | 4 +-- .github/workflows/docs.yml | 24 +++++++-------- .github/workflows/lint.yml | 49 ++++++++++++++++++------------ .github/workflows/readme.yml | 4 +-- 4 files changed, 45 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 24929098d1..a45194a057 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -8,8 +8,8 @@ jobs: name: Verify ansible-test sanity runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 + fetch-depth: 1 - name: Run ansible-test run: bash tests/sanity/sanity.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c5f1719ba0..a7e3645244 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,10 +8,10 @@ jobs: name: Check Ansible Documentation with ansible-core 2.13. runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: '3.x' - name: Install Ansible 2.13 @@ -25,10 +25,10 @@ jobs: name: Check Ansible Documentation with ansible-core 2.14. runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: '3.x' - name: Install Ansible 2.14 @@ -42,10 +42,10 @@ jobs: name: Check Ansible Documentation with ansible-core 2.15. runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: '3.x' - name: Install Ansible 2.15 @@ -59,10 +59,10 @@ jobs: name: Check Ansible Documentation with latest Ansible version. runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: '3.x' - name: Install Ansible-latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 849d9a1d53..af85964290 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,27 +8,36 @@ jobs: name: Verify ansible-lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + fetch-tags: true + - uses: actions/setup-python@main with: python-version: "3.x" - - name: Run ansible-lint + - name: Install ansible-lint + run: pip install "ansible-core" 'ansible-lint>=6.22' + - name: Build ansible-freeipa collection run: | - pip install "ansible-core>=2.16,<2.17" 'ansible-lint>=6.22' utils/build-galaxy-release.sh -ki cd .galaxy-build - ansible-lint --profile production --exclude tests/integration/ --exclude tests/unit/ --parseable --nocolor + - name: Run ansible-lint + run: ansible-lint --profile production --exclude tests/integration/ --exclude tests/unit/ --parseable --nocolor + #- name: Run ansible-lint + # run: | + # pip install "ansible-core" 'ansible-lint>=6.22' + # utils/build-galaxy-release.sh -ki + # cd .galaxy-build + # ansible-lint --profile production --exclude tests/integration/ --exclude tests/unit/ --parseable --nocolor yamllint: name: Verify yamllint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: "3.x" - name: Run yaml-lint @@ -38,10 +47,10 @@ jobs: name: Verify pydocstyle runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: "3.x" - name: Run pydocstyle @@ -53,10 +62,10 @@ jobs: name: Verify flake8 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: "3.x" - name: Run flake8 @@ -68,10 +77,10 @@ jobs: name: Verify pylint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 - - uses: actions/setup-python@v4.3.0 + fetch-depth: 1 + - uses: actions/setup-python@main with: python-version: "3.x" - name: Run pylint @@ -83,8 +92,8 @@ jobs: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 + fetch-depth: 1 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index edea5b9fe1..069d1f7cf1 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -8,9 +8,9 @@ jobs: name: Verify readme runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.1.0 + - uses: actions/checkout@main with: - fetch-depth: 0 + fetch-depth: 1 - name: Run readme test run: | error=0