chore(deps): bump actions/setup-python from 5.6.0 to 7.0.0 #387
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Test Linting | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: 'Log level' | |
| required: true | |
| default: 'warning' | |
| type: choice | |
| options: | |
| - info | |
| - warning | |
| - debug | |
| workflow_call: | |
| inputs: | |
| rolename: | |
| required: true | |
| type: string | |
| pull_request: | |
| types: [labeled] | |
| branches: | |
| - '*' | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| if: ${{ github.event_name != 'pull_request' || github.event.label.name == 'ci:run' }} | |
| runs-on: self-hosted | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out the codebase. | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install test dependencies. | |
| run: | | |
| uv venv "$RUNNER_TEMP/venv" --python /usr/bin/python3 | |
| source "$RUNNER_TEMP/venv/bin/activate" | |
| uv pip install -r requirements-test.txt | |
| echo "$RUNNER_TEMP/venv/bin" >> "$GITHUB_PATH" | |
| env: | |
| SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt | |
| - name: Install Ansible collection dependencies. | |
| env: | |
| CACHE_HOST: ${{ secrets.INCUS_HOST }} | |
| run: | | |
| # Fall back to upstream Galaxy when the cache host secret is not | |
| # available (e.g. Dependabot PRs, which do not inherit repo secrets). | |
| if [ -n "$CACHE_HOST" ]; then | |
| ansible-galaxy collection install \ | |
| "http://${CACHE_HOST}:8082/collections/community-general-12.3.0.tar.gz" \ | |
| "http://${CACHE_HOST}:8082/collections/community-crypto-3.1.1.tar.gz" \ | |
| "http://${CACHE_HOST}:8082/collections/ansible-posix-2.1.0.tar.gz" | |
| else | |
| ansible-galaxy collection install \ | |
| community.general:12.3.0 \ | |
| community.crypto:3.1.1 \ | |
| ansible.posix:2.1.0 | |
| fi | |
| - name: Lint code (yamllint). | |
| run: | | |
| yamllint . | |
| if: ${{ inputs.rolename == '' }} | |
| - name: Lint Role (yamllint). | |
| run: | | |
| yamllint "roles/${ROLENAME}" | |
| env: | |
| ROLENAME: ${{ inputs.rolename }} | |
| if: ${{ inputs.rolename != '' }} | |
| - name: Lint code (ansible-lint). | |
| run: | | |
| ansible-lint | |
| if: ${{ inputs.rolename == '' }} | |
| - name: Lint Role (ansible-lint). | |
| run: | | |
| ansible-lint "roles/${ROLENAME}" | |
| env: | |
| ROLENAME: ${{ inputs.rolename }} | |
| if: ${{ inputs.rolename != '' }} |