feat(trino): implement support for .sql
table expression method
#2
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: Docs/Linting/Benchmarks | |
on: | |
push: | |
branches: | |
- master | |
- "*.x.x" | |
pull_request: | |
branches: | |
- master | |
- "*.x.x" | |
merge_group: | |
concurrency: | |
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
permissions: | |
# increase the rate limit for nix operations hitting github, but limit the | |
# permissions to reading things | |
contents: read | |
jobs: | |
commitlint: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: install nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable-small | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: lint commits | |
run: nix run 'nixpkgs#commitlint' -- --from=${{ github.event.pull_request.base.sha }} --to=${{ github.sha }} --verbose | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: setup cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: ibis | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: nix-community,poetry2nix | |
# run against the full shell.nix on push so it gets pushed to cachix | |
- name: pre-commit checks | |
run: nix develop '.#preCommit' --ignore-environment --keep-going -c pre-commit run --all-files --show-diff-on-failure --color=always | |
release_notes_spellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: install nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: setup cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: ibis | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: nix-community,poetry2nix | |
- name: check generated release notes spelling | |
run: nix run '.#check-release-notes-spelling' | |
benchmarks: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install python | |
uses: actions/setup-python@v4 | |
id: install_python | |
with: | |
python-version: "3.11" | |
- name: install system dependencies | |
run: sudo apt-get install -qq -y build-essential libgeos-dev | |
- uses: syphar/restore-virtualenv@v1 | |
with: | |
requirement_files: poetry.lock | |
custom_cache_key_element: benchmarks | |
- uses: syphar/restore-pip-download-cache@v1 | |
with: | |
requirement_files: poetry.lock | |
custom_cache_key_element: benchmarks-${{ steps.install_python.outputs.python-version }} | |
- run: python -m pip install --upgrade pip 'poetry<1.4' | |
- name: install ibis | |
run: poetry install --without dev --without docs --all-extras | |
- name: make benchmark output dir | |
run: mkdir .benchmarks | |
- name: benchmark | |
run: poetry run pytest --benchmark-enable --benchmark-json .benchmarks/output.json ibis/tests/benchmarks | |
- uses: tibdex/github-app-token@v1 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.SQUAWK_BOT_APP_ID }} | |
private_key: ${{ secrets.SQUAWK_BOT_APP_PRIVATE_KEY }} | |
- uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: pytest | |
github-token: ${{ steps.generate-token.outputs.token }} | |
output-file-path: .benchmarks/output.json | |
benchmark-data-dir-path: ./bench | |
auto-push: false | |
comment-on-alert: true | |
alert-threshold: "300%" | |
- name: checkout gh-pages | |
run: git checkout gh-pages | |
- name: upload benchmark data | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bench | |
path: ./bench | |
if-no-files-found: error | |
docs_pr: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
concurrency: docs-${{ github.repository }}-${{ github.head_ref || github.sha }} | |
steps: | |
- name: install nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: setup cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: ibis | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: nix-community,poetry2nix | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: build docs | |
run: nix develop --ignore-environment -c mkdocs build --strict | |
- name: verify internal links | |
run: nix develop --ignore-environment '.#links' -c just checklinks --offline --no-progress | |
docs_push: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
concurrency: docs-${{ github.repository }} | |
needs: | |
# wait on benchmarks to prevent a race condition when pushing to the | |
# gh-pages branch | |
- benchmarks | |
steps: | |
- name: install nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: setup cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: ibis | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: nix-community,poetry2nix | |
- name: Generate a GitHub token | |
uses: tibdex/github-app-token@v1 | |
id: generate_token | |
with: | |
app_id: ${{ secrets.DOCS_BOT_APP_ID }} | |
private_key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }} | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate_token.outputs.token }} | |
- name: Configure git info | |
run: | | |
set -euo pipefail | |
git config user.name 'ibis-docs-bot[bot]' | |
git config user.email 'ibis-docs-bot[bot]@users.noreply.github.com' | |
git config http.postBuffer 157286400 | |
git config http.version 'HTTP/1.1' | |
- name: download benchmark data | |
uses: actions/download-artifact@v3 | |
with: | |
name: bench | |
path: docs/bench | |
- name: build and push dev docs | |
run: | | |
nix develop --ignore-environment -c \ | |
mkdocs gh-deploy --message 'docs: ibis@${{ github.sha }}' --ignore-version | |
simulate_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: ibis | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: nix-community,poetry2nix | |
- name: Configure git info | |
run: | | |
set -euo pipefail | |
# not incredibly important what user we use here | |
# | |
# we're making a commit in a temporary worktree that is thrown away | |
# if the process exits successfully | |
# | |
# git requires user information to make commits | |
git config user.name 'ibis-squawk-bot[bot]' | |
git config user.email 'ibis-squawk-bot[bot]@users.noreply.github.com' | |
- name: run semantic-release | |
run: ./ci/release/dry_run.sh |