File: ci-cd.yml

package info (click to toggle)
python-aiobotocore 2.25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,524 kB
  • sloc: python: 15,437; makefile: 84
file content (117 lines) | stat: -rw-r--r-- 3,018 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
name: CI/CD

permissions: {}

on:
  merge_group:
  push:
    branches:
    - master
    tags:
    - >-
      [0-9]+.[0-9]+.[0-9]+
    - >-
      [0-9]+.[0-9]+.[0-9]+.dev[0-9]+
  pull_request:
    branches:
    - master
    - >-
      [0-9].[0-9]+.[0-9]+

env:
  FORCE_COLOR: 1

jobs:
  build:
    uses: ./.github/workflows/reusable-build.yml

  test:
    # yamllint disable-line rule:line-length
    name: test${{ '' }}  # zizmor: ignore[obfuscation] nest jobs under the same sidebar category
    strategy:
      matrix:
        python-version:
        - 3.9
        - >-
          3.10
        - 3.11
        - 3.12
        - 3.13
        - 3.14
        os:
        - ubuntu-24.04
        - ubuntu-24.04-arm
        no-httpx:
        - false
        experimental:
        - false
        include:
        - python-version: 3.14  # add a no-httpx run
          os: ubuntu-24.04
          no-httpx: true
          experimental: false
      fail-fast: false
    uses: ./.github/workflows/reusable-test.yml
    with:
      python-version: ${{ matrix.python-version }}
      os: ${{ matrix.os }}
      continue-on-error: ${{ matrix.experimental }}
      enable-cache: ${{ github.ref_type == 'tag' && 'false' || 'auto' }}
      no-httpx: ${{ matrix.no-httpx }}
    secrets:
      codecov-token: ${{ secrets.CODECOV_TOKEN }}

  zizmor:
    name: 🌈 zizmor
    permissions:
      security-events: write

    # yamllint disable-line rule:line-length
    uses: zizmorcore/workflow/.github/workflows/reusable-zizmor.yml@3bb5e95068d0f44b6d2f3f7e91379bed1d2f96a8

  check:  # This job does nothing and is only used for the branch protection
    if: always()
    needs:
    - build
    - test
    - zizmor
    runs-on: ubuntu-24.04
    timeout-minutes: 5

    steps:
    - name: Decide whether the needed jobs succeeded or failed
      # yamllint disable-line rule:line-length
      uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe  # v1.2.2
      with:
        jobs: ${{ toJSON(needs) }}

  pypi-publish:
    name: Publish Python 🐍 distribution 📦 to PyPI
    if: github.ref_type == 'tag'  # only publish on tag pushes
    needs:
    - check
    runs-on: ubuntu-24.04
    environment:
      name: pypi
      url: https://pypi.org/project/aiobotocore/${{ github.ref_name }}
    permissions:
      # IMPORTANT: this permission is mandatory for trusted publishing
      id-token: write
    timeout-minutes: 5

    steps:
    - name: Download distribution 📦
      uses: actions/download-artifact@v6
      with:
        name: python-package-distributions
        path: dist/
    - name: Check if distribution 📦 names match git tag
      run: |
        test -f "dist/aiobotocore-${REF_NAME}.tar.gz"
        test -f "dist/aiobotocore-${REF_NAME}-py3-none-any.whl"
      env:
        REF_NAME: ${{ github.ref_name }}
    - name: Publish distribution 📦 to PyPI
      # yamllint disable-line rule:line-length
      uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e  # v1.13.0