postmortem for 2.1.0a0 (#120) #384
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- master | |
- 0.3.x | |
pull_request: | |
branches: | |
- master | |
- 0.3.x | |
env: | |
PYTHONIOENCODING: utf-8 | |
PYTHONUNBUFFERED: '1' | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
# until have mamabforge... | |
CONDA_EXE: mamba | |
# our stuff | |
SKIP_CONDA_PREFLIGHT: 1 | |
CACHE_EPOCH: 2 | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }}-latest | |
env: | |
BUILDING_IN_CI: 1 | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu] | |
py: ['3.11'] | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: setup (python) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.py }} | |
architecture: x64 | |
- name: setup (node) | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: cache (pip) | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build-${{ hashFiles('.github/requirements-build.txt') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build- | |
- name: cache (node) | |
uses: actions/cache@v4 | |
id: cache-node-modules | |
with: | |
path: '**/node_modules' | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock') }} | |
- name: setup (pip) | |
run: pip install -U pip wheel setuptools | |
- name: setup (pip build) | |
run: pip install -U -v -r .github/requirements-build.txt | |
- name: check (pip) | |
run: | | |
set -eux | |
mkdir -p build/pip | |
pip freeze | tee build/pip/dist.pip.freeze | |
pip check | |
- name: build | |
shell: bash -l {0} | |
run: | | |
doit build || doit build | |
- name: build | |
shell: bash -l {0} | |
run: | | |
doit preflight:release | |
- name: publish dists | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ipyelk-${{ github.run_number }}-dist | |
path: ./dist | |
lint: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu] | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: cache (yarn) | |
uses: actions/cache@v4 | |
with: | |
path: node_modules/ | |
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock', '.yarnrc') }} | |
- name: base env (conda) | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: .github/base-environment.yml | |
miniforge-variant: Miniforge3 | |
use-mamba: true | |
- name: lint | |
shell: bash -l {0} | |
run: | | |
doit -n4 lint || doit lint || exit 1 | |
- name: build docs | |
shell: bash -l {0} | |
run: doit -n4 docs | |
- name: upload docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ipyelk-${{ github.run_number }}-docs | |
path: | | |
./build/docs | |
- name: cache (docs) | |
uses: actions/cache@v4 | |
with: | |
path: build/links | |
key: | | |
${{ env.CACHE_EPOCH }}-links-${{ runner.os }}-${{ hashFiles('.github/base-environment.yml') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-links-${{ runner.os }}- | |
${{ env.CACHE_EPOCH }}-links- | |
- name: docs | |
shell: bash -l {0} | |
run: doit -n4 checkdocs | |
test: | |
runs-on: ${{ matrix.os }}-latest | |
needs: [build] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos, windows] | |
py: ['3.11'] | |
include: | |
- os: ubuntu | |
subdir: linux-64 | |
- os: macos | |
subdir: osx-arm64 | |
- os: windows | |
subdir: win-64 | |
- py: '3.11' | |
artifact: wheel | |
env: | |
INSTALL_ARTIFACT: ${{ matrix.artifact }} | |
TESTING_IN_CI: 'true' | |
ATEST_RETRIES: '2' | |
IPYELK_PY: ${{ matrix.py }} | |
steps: | |
- name: configure line endings | |
run: | | |
git config --global core.autocrlf false | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: env (conda) | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: .github/base-environment.yml | |
miniforge-variant: Miniforge3 | |
use-mamba: true | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ipyelk-${{ github.run_number }}-dist | |
path: ./dist | |
- name: test (linux) | |
if: ${{ contains(matrix.os, 'ubuntu') }} | |
shell: bash -l {0} | |
run: | | |
doit -n4 test || doit test || exit 1 | |
- name: test (macos) | |
if: ${{ contains(matrix.os, 'macos') }} | |
shell: bash -l {0} | |
run: doit -n4 test || doit test || exit 1 | |
- name: test (windows) | |
if: ${{ contains(matrix.os, 'windows') }} | |
shell: cmd /C CALL {0} | |
env: | |
ATEST_PROCESSES: 1 | |
WIN_CI: 1 | |
run: doit test || doit test || exit 1 | |
- name: reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: |- | |
ipyelk-${{ github.run_number }}-${{ job.status }}-reports-${{ matrix.os }}-${{ matrix.py }} | |
path: | | |
./build/reports | |
./build/htmlcov | |
./build/pytest.html | |
if: always() |