Normalize more (windows) paths #73
Workflow file for this run
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: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
PYTHONUNBUFFERED: "1" | |
PIP_DISABLE_PIP_VERSION_CHECK: "1" | |
CI: "1" | |
# our stuff | |
CACHE_EPOCH: "6" | |
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu] | |
python-version: ["3.11"] | |
outputs: | |
wheel: ${{ steps.wheel.outputs.wheel }} | |
steps: | |
- uses: actions/checkout@v4 | |
# configure builtin providers | |
- name: setup (python) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
# restore caches | |
- name: cache (pip) | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build-${{ hashFiles('.github/reqs/build.txt') }} | |
restore-keys: | | |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build- | |
- name: setup (pip) | |
run: pip install -U pip wheel setuptools | |
- name: setup (pip build) | |
run: pip install -U -v -r .github/reqs/build.txt --no-build-isolation | |
- name: bootstrap | |
run: doit bootstrap | |
- name: lint | |
run: doit -n8 lint:py:ruff | |
- name: list | |
run: doit list --all --status | |
- name: build | |
run: doit build:source_date_epoch && doit build | |
- name: status | |
run: doit list --all --status | sort | |
if: always() | |
- name: upload (dist) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: doitoml-dist-${{ github.run_number }} | |
path: ./dist | |
- id: wheel | |
name: get wheel name | |
run: | | |
echo "wheel=$(ls dist/*.whl)" >> $GITHUB_OUTPUT | |
docs: | |
name: docs | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu] | |
python-version: ["3.11"] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install (conda) | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: .binder/environment.yml | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: bootstrap | |
run: doit bootstrap && doit build:source_date_epoch | |
- name: list | |
run: doit list --all --status | |
- name: lint | |
run: doit lint | |
- name: build | |
run: doit build | |
- name: docs | |
run: doit docs:sphinx | |
- name: check | |
run: doit docs | |
- name: status | |
run: doit list --all --status | sort | |
if: always() | |
test: | |
name: test (${{ matrix.os }} ${{ matrix.python-version }}) | |
needs: [build] | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu", "macos", "windows"] | |
python-version: ["3.8", "3.11"] | |
env: | |
DOITOML_SKIP_CODEGEN: 1 | |
steps: | |
- name: configure line endings | |
run: | | |
git config --global core.autocrlf false | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install (conda) | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: .github/environment.yml | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: bootstrap (unix) | |
if: matrix.os != 'windows' | |
shell: bash -l {0} | |
run: doit bootstrap | |
- name: bootstrap (windows) | |
if: matrix.os == 'windows' | |
shell: cmd /C CALL {0} | |
run: doit bootstrap | |
- name: "test: unit (unix)" | |
if: matrix.os != 'windows' | |
shell: bash -l {0} | |
run: doit test:unit | |
- name: "test: unit (windows)" | |
if: matrix.os == 'windows' | |
shell: cmd /C CALL {0} | |
run: doit test:unit | |
- name: "test: full (unix)" | |
if: matrix.os != 'windows' | |
shell: bash -l {0} | |
run: doit test | |
- name: "test: full (windows)" | |
if: matrix.os == 'windows' | |
shell: cmd /C CALL {0} | |
env: | |
COV_FAIL_UNDER: "95" | |
run: doit test | |
- name: upload (reports) | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: |- | |
doitoml-test-${{ matrix.os }}-${{matrix.python-version }}-${{ github.run_number }} | |
path: ./build/reports | |
- name: Rename uncached conda packages | |
shell: bash | |
run: mv "${CONDA_PKGS_DIR}" "${CONDA_PKGS_DIR}_do_not_cache" | |
smoke: | |
runs-on: ${{ matrix.os }}-latest | |
needs: [build] | |
name: smoke (${{ matrix.os }} ${{ matrix.python-version }}) | |
strategy: | |
max-parallel: 2 | |
fail-fast: false | |
matrix: | |
os: ["ubuntu", "macos", "windows"] | |
python-version: ["3.11"] | |
steps: | |
- name: download (dist) | |
uses: actions/download-artifact@v4 | |
with: | |
name: doitoml-dist-${{ github.run_number }} | |
path: ./dist | |
- name: setup (python) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: install dist | |
run: | | |
ls "${{ needs.build.outputs.wheel }}" || dir "${{ needs.build.outputs.wheel }}" | |
pip install -vv "${{ needs.build.outputs.wheel }}" | |
pip check | |
- name: cli smoke test | |
run: | | |
python -c "__import__('doitoml')" |