refactor: always rewrite first -> first_value
/last -> last_value
…
#136
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: Check Generated Files | |
on: | |
push: | |
paths: | |
- README.md | |
- poetry.lock | |
- pyproject.toml | |
- requirements-dev.txt | |
pull_request: | |
paths: | |
- README.md | |
- poetry.lock | |
- pyproject.toml | |
- requirements-dev.txt | |
concurrency: | |
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: "1" | |
SQLALCHEMY_WARN_20: "1" | |
HYPOTHESIS_PROFILE: "ci" | |
jobs: | |
check_setuptools_install: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install poetry | |
run: pipx install 'poetry==1.8.1' | |
- name: install python | |
uses: actions/setup-python@v5 | |
id: install_python | |
with: | |
python-version: "3.11" | |
cache: pip | |
cache-dependency-path: requirements-dev.txt | |
- name: update apt-get | |
run: sudo apt-get update -y -q | |
- name: install system dependencies | |
run: sudo apt-get install -y -q build-essential graphviz libgeos-dev freetds-dev unixodbc-dev | |
- name: check consistency with pyproject.toml | |
run: poetry check --lock | |
- name: check that the `all` extra matches the current lock file | |
run: | | |
set -euo pipefail | |
js="$(mktemp --suffix=.pyproject.json)" | |
docker run --rm -i sclevine/yj -tj < pyproject.toml > "$js" | |
old="$(mktemp --suffix=.old)" | |
jq -rM '.tool.poetry.extras.all | unique | sort' < "$js" > "$old" | |
new="$(mktemp --suffix=.new)" | |
jq -rM '.tool.poetry.extras | with_entries(select(.key != "all")) | [.[]] | add | unique | sort' < "$js" > "$new" | |
diff --unified "$old" "$new" | |
- name: generate requirements-dev.txt | |
run: poetry export --extras all --with dev --with test --with docs --without-hashes --no-ansi > requirements-dev.txt | |
- name: check requirements-dev.txt | |
run: git diff --exit-code requirements-dev.txt | |
- name: install using requirements-dev.txt | |
run: pip install -r requirements-dev.txt | |
- name: install ibis in development mode | |
run: pip install -e . | |
- name: run tests | |
run: pytest -m core -n auto --cov-report=xml:coverage.xml --cov=ibis | |
- name: upload code coverage | |
if: success() | |
continue-on-error: true | |
uses: codecov/codecov-action@v4 | |
with: | |
flags: core,${{ runner.os }},python-${{ steps.install_python.outputs.python-version }} |