Update black requirement from <26.0.0,>=25.0.0 to >=25.0.0,<27.0.0 in /unix #95
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: "Advanced Prechecks Unix" | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| types: [ labeled ] | |
| paths-ignore: | |
| - "*.md" | |
| - "!unix/**" | |
| - "unix/prechecks/**" | |
| jobs: | |
| ubuntu: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.label.name == 'ci' }} | |
| strategy: | |
| matrix: | |
| python-version: [ '3.10', '3.11', '3.12', '3.13' ] | |
| name: Ubuntu prechecks - Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| - name: Install pipenv | |
| run: python -m pip install --upgrade pipenv wheel | |
| ## Check packaging ## | |
| - name: Install dependencies | |
| working-directory: unix | |
| run: pipenv install --deploy | |
| - name: Run machine stats | |
| working-directory: unix | |
| run: pipenv run machine-stats -h | |
| rhel: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.label.name == 'ci' }} | |
| strategy: | |
| matrix: | |
| python-version: [ '3.10', '3.11', '3.12', '3.13' ] | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: ${{ secrets.AWS_DEPLOYMENT_REGION }} | |
| name: RHEL8 prechecks - Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install packer | |
| uses: hashicorp-contrib/setup-packer@v1 | |
| # Branch name is extracted because it needs to be passed as an environment variable | |
| # to the packer builder. Branch name can be derived from the GitHub references. | |
| # GitHub references for branches and pull requests are different. | |
| # Thus, this steps looks at the workflow trigger and decides the branch ref based on that. | |
| # For more information have a look at the `github` context of workflows. | |
| # https://docs.github.com/en/github-ae@latest/actions/learn-github-actions/contexts#github-context | |
| - name: Extract branch name | |
| id: extract_branch | |
| run: | | |
| BRANCH_REF=${{ github.ref }} | |
| TRIMMED_REF=${BRANCH_REF/refs\/heads\//} | |
| BRANCH_HEAD_REF=${{ github.head_ref }} | |
| TRIMMED_HEAD_REF=${BRANCH_HEAD_REF/refs\/heads\//} | |
| if [[ ${{ github.event_name }} == 'pull_request' ]]; then | |
| echo "::set-output name=current_branch::${TRIMMED_HEAD_REF}" | |
| else | |
| echo "::set-output name=current_branch::${TRIMMED_REF}" | |
| fi | |
| - name: Run packer builder | |
| working-directory: unix/prechecks/rhel8 | |
| run: | | |
| packer init -upgrade rhel8.pkr.hcl | |
| packer build . | |
| env: | |
| PACKER_PYTHON_VERSION: ${{ matrix.python-version }} | |
| CURRENT_BRANCH_NAME: ${{ steps.extract_branch.outputs.current_branch }} |