Skip to content

Commit d8fd7d9

Browse files
authored
feat(ci): More readable workflow job titles (#3111)
* More readable workflow job titles (hopefully) * Use single quotes * Fix HDF5 build title * Extend python build matrix for ibis core * Fix docs build named as benchmark; add auto cancellation for PRs * Dummy change to test auto cancellation * Install cytoolz only if python < 3.10 * Regenerate setup.py * Update poetry lock * Update poetry lock
1 parent 52fa8a9 commit d8fd7d9

File tree

6 files changed

+249
-208
lines changed

6 files changed

+249
-208
lines changed

.github/workflows/main.yml renamed to .github/workflows/ibis-backends.yml

Lines changed: 31 additions & 201 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# vim: filetype=yaml
2-
name: CI
2+
name: Backends
33

44
on:
55
push:
@@ -9,59 +9,13 @@ on:
99
branches:
1010
- master
1111

12-
jobs:
13-
test_no_backends:
14-
runs-on: ${{ matrix.os }}
15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
os:
19-
- ubuntu-latest
20-
- windows-latest
21-
python-version:
22-
- "3.7"
23-
- "3.9"
24-
steps:
25-
- name: checkout
26-
uses: actions/checkout@v2
27-
28-
- name: install python
29-
uses: actions/setup-python@v2
30-
with:
31-
python-version: ${{ matrix.python-version }}
32-
33-
- name: install poetry
34-
run: pip install poetry
35-
36-
- name: cache dependencies linux
37-
uses: actions/cache@v2
38-
if: ${{ matrix.os == 'ubuntu-latest' }}
39-
with:
40-
path: ~/.cache/pypoetry
41-
key: no-backends-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
42-
43-
- name: cache dependencies windows
44-
uses: actions/cache@v2
45-
if: ${{ matrix.os == 'windows-latest' }}
46-
with:
47-
path: ~\AppData\Local\pypoetry
48-
key: no-backends-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
49-
50-
- name: install ibis
51-
run: poetry install
52-
53-
- name: run tests
54-
shell: bash
55-
run: ./ci/run_tests.sh ibis/tests
56-
57-
- name: publish test report
58-
uses: actions/upload-artifact@v2
59-
if: success() || failure()
60-
with:
61-
name: no-backends-${{ matrix.os }}-${{ matrix.python-version }}
62-
path: junit.xml
12+
concurrency:
13+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
14+
cancel-in-progress: true
6315

16+
jobs:
6417
test_simple_backends:
18+
name: ${{ matrix.backend.title }} ${{ matrix.os }} python-${{ matrix.python-version }}
6519
runs-on: ${{ matrix.os }}
6620
strategy:
6721
fail-fast: false
@@ -74,24 +28,33 @@ jobs:
7428
- "3.9"
7529
backend:
7630
- name: csv
31+
title: CSV
7732
- name: dask
33+
title: Dask
7834
- name: dask
35+
title: Dask Extra
7936
deps:
8037
- "[email protected] --extras array --extras dataframe"
8138
- name: hdf5
39+
title: HDF5
8240
- name: pandas
41+
title: Pandas
8342
- name: parquet
43+
title: Parquet
8444
- name: sqlite
45+
title: SQLite
8546
exclude:
8647
- os: windows-latest
8748
python-version: "3.9"
8849
backend:
8950
name: hdf5
51+
title: HDF5
9052
include:
9153
- os: windows-latest
9254
python-version: "3.8"
9355
backend:
9456
name: hdf5
57+
title: HDF5
9558
steps:
9659
- name: checkout
9760
uses: actions/checkout@v2
@@ -145,6 +108,7 @@ jobs:
145108
path: junit.xml
146109

147110
test_postgres:
111+
name: PostgreSQL ubuntu-latest python-${{ matrix.python-version }}
148112
runs-on: ubuntu-latest
149113
strategy:
150114
fail-fast: false
@@ -215,6 +179,7 @@ jobs:
215179
path: junit.xml
216180

217181
test_pyspark:
182+
name: PySpark ${{ matrix.pyspark.version }} ubuntu-latest python-${{ matrix.python-version }}
218183
runs-on: ubuntu-latest
219184
strategy:
220185
fail-fast: false
@@ -227,7 +192,8 @@ jobs:
227192
jdk: "8"
228193
env:
229194
ARROW_PRE_0_15_IPC_FORMAT: 1
230-
- jdk: "11"
195+
- version: "latest"
196+
jdk: "11"
231197
env:
232198
ARROW_PRE_0_15_IPC_FORMAT: 0
233199
exclude:
@@ -256,13 +222,13 @@ jobs:
256222

257223
- name: cache dependencies
258224
uses: actions/cache@v2
259-
if: ${{ matrix.pyspark.version == null }}
225+
if: ${{ matrix.pyspark.version == 'latest' }}
260226
with:
261227
path: ~/.cache/pypoetry
262228
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}-pyspark-${{ matrix.pyspark.version }}
263229

264230
- name: pin pyspark
265-
if: ${{ matrix.pyspark.version != null }}
231+
if: ${{ matrix.pyspark.version != 'latest' }}
266232
run: poetry add --lock --optional "pyspark@${{ matrix.pyspark.version }}"
267233

268234
- name: install ibis
@@ -285,6 +251,7 @@ jobs:
285251
path: junit.xml
286252

287253
test_impala:
254+
name: Impala ubuntu-latest python-${{ matrix.python-version }}
288255
runs-on: ubuntu-latest
289256
env:
290257
IBIS_TEST_NN_HOST: localhost
@@ -386,6 +353,7 @@ jobs:
386353
path: junit.xml
387354

388355
test_mysql_clickhouse:
356+
name: ${{ matrix.backend.title }} ubuntu-latest python-${{ matrix.python-version }}
389357
runs-on: ubuntu-latest
390358
strategy:
391359
fail-fast: false
@@ -394,8 +362,10 @@ jobs:
394362
- "3.7"
395363
- "3.9"
396364
backend:
397-
- mysql
398-
- clickhouse
365+
- name: mysql
366+
title: MySQL
367+
- name: clickhouse
368+
title: ClickHouse
399369
services:
400370
mysql:
401371
image: mariadb:10.4.12
@@ -428,20 +398,20 @@ jobs:
428398
uses: actions/cache@v2
429399
with:
430400
path: ~/.cache/pypoetry
431-
key: ${{ matrix.backend }}-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
401+
key: ${{ matrix.backend.name }}-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
432402

433403
- name: install ibis
434-
run: poetry install --extras ${{ matrix.backend }}
404+
run: poetry install --extras ${{ matrix.backend.name }}
435405

436406
- name: download backend data
437407
run: poetry run python ci/datamgr.py download
438408

439409
- name: install backend data
440-
run: poetry run python ci/datamgr.py ${{ matrix.backend }}
410+
run: poetry run python ci/datamgr.py ${{ matrix.backend.name }}
441411

442412
- name: run tests
443413
env:
444-
PYTEST_BACKENDS: ${{ matrix.backend }}
414+
PYTEST_BACKENDS: ${{ matrix.backend.name }}
445415
run: ./ci/run_tests.sh
446416

447417
- name: publish test report
@@ -450,143 +420,3 @@ jobs:
450420
with:
451421
name: ${{ matrix.backend }}-${{ matrix.python-version }}
452422
path: junit.xml
453-
454-
benchmarks:
455-
runs-on: ubuntu-latest
456-
strategy:
457-
fail-fast: false
458-
matrix:
459-
python-version:
460-
- "3.9"
461-
steps:
462-
- name: checkout
463-
uses: actions/checkout@v2
464-
465-
- name: install python
466-
uses: actions/setup-python@v2
467-
with:
468-
python-version: ${{ matrix.python-version }}
469-
470-
- name: install system dependencies
471-
run: sudo apt-get install -qq -y build-essential cmake krb5-config python-dev libkrb5-dev libboost-all-dev
472-
473-
- name: install poetry
474-
run: pip install poetry
475-
476-
- name: cache dependencies
477-
uses: actions/cache@v2
478-
with:
479-
path: ~/.cache/pypoetry
480-
key: benchmarks-impala-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
481-
482-
- name: install ibis
483-
run: poetry install --extras impala
484-
485-
- name: benchmark
486-
run: |
487-
set -euo pipefail
488-
489-
poetry run asv machine --yes
490-
poetry run asv dev
491-
492-
docs:
493-
runs-on: ubuntu-latest
494-
strategy:
495-
fail-fast: false
496-
matrix:
497-
python-version:
498-
- "3.9"
499-
steps:
500-
- name: checkout
501-
uses: actions/checkout@v2
502-
503-
- name: install system dependencies
504-
run: sudo apt-get install -qq -y build-essential cmake krb5-config python-dev libkrb5-dev libboost-all-dev pandoc
505-
506-
- name: install python
507-
uses: actions/setup-python@v2
508-
with:
509-
python-version: ${{ matrix.python-version }}
510-
511-
- name: install poetry
512-
run: pip install poetry
513-
514-
- name: cache dependencies
515-
uses: actions/cache@v2
516-
with:
517-
path: ~/.cache/pypoetry
518-
key: docs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
519-
520-
- name: install ibis
521-
run: poetry install --extras all
522-
523-
- name: build web
524-
run: poetry run python -m pysuerga docs/web --target-path=docbuild
525-
526-
- name: build docs
527-
run: poetry run sphinx-build -b html docs/source docbuild/docs -W -T
528-
529-
- name: Add config to docs
530-
run: |
531-
set -euo pipefail
532-
533-
touch docbuild/.nojekyll
534-
echo "ibis-project.org" > docbuild/CNAME
535-
536-
- name: Push docs
537-
if: ${{ github.event_name == 'push' }}
538-
uses: cpina/[email protected]
539-
env:
540-
API_TOKEN_GITHUB: ${{ secrets.IBIS_PROJECT_DOCS_PAT }}
541-
with:
542-
source-directory: docbuild
543-
target-branch: master
544-
destination-github-username: ibis-project
545-
destination-repository-name: ibis-project.org
546-
user-email: '41898282+github-actions[bot]@users.noreply.github.com'
547-
548-
- name: Clean up doc build
549-
run: rm -r docbuild
550-
551-
conda_package:
552-
# TODO: fully automate the conda-forge PR submission on release
553-
runs-on: ubuntu-latest
554-
strategy:
555-
matrix:
556-
python-version:
557-
- "3.7"
558-
defaults:
559-
run:
560-
shell: bash -l {0}
561-
steps:
562-
- name: checkout
563-
uses: actions/checkout@v2
564-
565-
- name: update recipe file
566-
run: |
567-
set -euo pipefail
568-
569-
# TODO: this is a hack that should be fixed by automatically generating
570-
# a recipe from pyproject.toml once we move to poetry
571-
set -x
572-
IBIS_PATH=`pwd`
573-
sed -i "s|url:.*|path: $IBIS_PATH|g" ci/recipe/meta.yaml
574-
IBIS_VERSION=$(grep -Po '(?<=^version = ").+(?=")' pyproject.toml)
575-
sed -i "s/{{ version }}/$IBIS_VERSION/g" ci/recipe/meta.yaml
576-
cat ci/recipe/meta.yaml
577-
578-
- uses: conda-incubator/setup-miniconda@v2
579-
with:
580-
mamba-version: "*"
581-
miniforge-version: latest
582-
miniforge-variant: Mambaforge
583-
channel-priority: strict
584-
activate-environment: ibis
585-
python-version: ${{ matrix.python-version }}
586-
condarc-file: ci/condarc
587-
588-
- name: install boa
589-
run: mamba install boa
590-
591-
- name: build recipe
592-
run: conda mambabuild -c conda-forge --python "${{ matrix.python-version }}" ci/recipe/meta.yaml

0 commit comments

Comments
 (0)