Skip to content

Commit dab35b2

Browse files
committed
updated build action
1 parent 71bfb02 commit dab35b2

File tree

1 file changed

+12
-40
lines changed

1 file changed

+12
-40
lines changed

.github/workflows/build_tests.yml

+12-40
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ on:
1313

1414
jobs:
1515

16-
build:
16+
build_wheels:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
2020
python-version: ['3.9', '3.10', '3.11', '3.12']
2121
os: [windows-latest, macOS-latest, ubuntu-latest]
22+
fail-fast: false
2223
steps:
2324
- uses: actions/checkout@v4
2425
- name: Set up Python
@@ -41,13 +42,14 @@ jobs:
4142
name: pecos_${{ matrix.python-version }}_${{ matrix.os }}.whl
4243
path: dist/pecos*
4344

44-
install_import:
45-
needs: build
45+
test_wheels:
46+
needs: build_wheels
4647
runs-on: ${{ matrix.os }}
4748
strategy:
4849
matrix:
4950
python-version: ['3.9', '3.10', '3.11', '3.12']
5051
os: [windows-latest, macOS-latest, ubuntu-latest]
52+
fail-fast: false
5153
steps:
5254
- name: Set up Python
5355
uses: actions/setup-python@v5
@@ -66,7 +68,7 @@ jobs:
6668
run: |
6769
python -c "import pecos"
6870
69-
pytest_coverage:
71+
run_coverage:
7072
runs-on: ${{ matrix.os }}
7173
strategy:
7274
matrix:
@@ -98,7 +100,7 @@ jobs:
98100
path: .coverage.${{ matrix.python-version }}.${{ matrix.os }}
99101

100102
combine_reports:
101-
needs: [ pytest_coverage ]
103+
needs: [ run_coverage ]
102104
runs-on: ubuntu-latest
103105
steps:
104106
- name: Set up Python
@@ -111,11 +113,12 @@ jobs:
111113
python -m pip install --upgrade pip
112114
pip install -r requirements.txt
113115
python -m pip install -e .
116+
pip install coveralls
114117
- name: Download coverage artifacts from test matrix
115118
uses: actions/download-artifact@v4
116119
with:
117120
name: coverage
118-
- name: Setup coverage and combine reports
121+
- name: Create coverage report
119122
run: |
120123
echo "[paths]" > .coveragerc
121124
echo "source = " >> .coveragerc
@@ -125,52 +128,21 @@ jobs:
125128
echo " /home/runner/work/pecos/pecos/pecos" >> .coveragerc
126129
echo " /Users/runner/work/pecos/pecos/pecos" >> .coveragerc
127130
coverage combine
128-
- name: Create coverage report
129-
run: |
131+
130132
coverage report
131133
coverage json --pretty-print
132134
coverage html --show-contexts
133135
- name: Save coverage JSON
134136
uses: actions/upload-artifact@v4
135137
with:
136-
name: coverage
138+
name: coverage-json
137139
path: coverage.json
138140
- name: Save coverage html
139141
uses: actions/upload-artifact@v4
140142
with:
141-
name: coverage
143+
name: coverage-html
142144
path: htmlcov
143145

144-
coveralls:
145-
needs: [ pytest_coverage ]
146-
runs-on: ubuntu-latest
147-
continue-on-error: true
148-
steps:
149-
- name: Set up Python
150-
uses: actions/setup-python@v5
151-
with:
152-
python-version: 3.11
153-
- uses: actions/checkout@v4
154-
- name: Install coverage
155-
run: |
156-
python -m pip install --upgrade pip
157-
pip install coveralls
158-
pip install -r requirements.txt
159-
python -m pip install -e .
160-
- name: Download coverage artifacts from test matrix
161-
uses: actions/download-artifact@v2
162-
with:
163-
name: coverage
164-
- name: Setup coverage and combine reports
165-
run: |
166-
echo "[paths]" > .coveragerc
167-
echo "source = " >> .coveragerc
168-
echo " pecos/" >> .coveragerc
169-
echo " pecos\\" >> .coveragerc
170-
echo " D:\\a\\pecos\\pecos\\pecos" >> .coveragerc
171-
echo " /home/runner/work/pecos/pecos/pecos" >> .coveragerc
172-
echo " /Users/runner/work/pecos/pecos/pecos" >> .coveragerc
173-
coverage combine
174146
- name: Push to coveralls
175147
run: |
176148
coveralls --service=github

0 commit comments

Comments
 (0)