@@ -63,12 +63,72 @@ jobs:
6363 python -m site
6464 python -m pip install --upgrade pip setuptools wheel
6565 python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0
66+ python -m pip install --upgrade coverage_pyver_pragma
6667
6768 - name : " Run Tests for Python ${{ matrix.config.python-version }}"
6869 if : steps.setup-python.outcome == 'success'
6970 run : python -m tox -e "${{ matrix.config.testenvs }}" -s false
7071
72+ - name : " Upload Coverage 🚀"
73+ uses : actions/upload-artifact@v4
74+ if : ${{ always() && steps.setup-python.outcome == 'success' }}
75+ with :
76+ name : " coverage-${{ matrix.config.python-version }}"
77+ path : .coverage
78+ include-hidden-files : true
79+
80+
81+ Coverage :
82+ needs : tests
83+ permissions :
84+ actions : write
85+ contents : read
86+ runs-on : " ubuntu-22.04"
87+ steps :
88+ - name : Checkout 🛎️
89+ uses : " actions/checkout@v4"
90+
91+ - name : Setup Python 🐍
92+ uses : " actions/setup-python@v5"
93+ with :
94+ python-version : 3.8
95+
96+ - name : Install dependencies 🔧
97+ run : |
98+ python -m pip install --upgrade pip setuptools wheel
99+ python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma
100+
101+ - name : " Download Coverage 🪂"
102+ uses : actions/download-artifact@v4
103+ with :
104+ path : coverage
105+
106+ - name : Display structure of downloaded files
107+ id : show
108+ run : ls -R
109+ working-directory : coverage
110+ continue-on-error : true
71111
112+ - name : Combine Coverage 👷
113+ if : ${{ steps.show.outcome != 'failure' }}
114+ run : |
115+ shopt -s globstar
116+ python -m coverage combine coverage/**/.coverage
117+
118+ - name : " Upload Combined Coverage Artefact 🚀"
119+ if : ${{ steps.show.outcome != 'failure' }}
120+ uses : actions/upload-artifact@v4
121+ with :
122+ name : " combined-coverage"
123+ path : .coverage
124+ include-hidden-files : true
125+
126+ - name : " Upload Combined Coverage to Coveralls"
127+ if : ${{ steps.show.outcome != 'failure' }}
128+ env :
129+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
130+ run : |
131+ coveralls --service=github
72132
73133 Deploy :
74134 needs : tests
0 commit comments