-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
61 lines (59 loc) · 2.05 KB
/
Copy pathaction.yaml
File metadata and controls
61 lines (59 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "provensql SQL equivalence check"
description: "Fail a pull request when a SQL change is not proven equivalence-preserving. Sound by construction: never a false EQUIVALENT."
author: "Nachiket Lele"
branding:
icon: "check-circle"
color: "green"
inputs:
paths:
description: "Newline- or comma-separated glob(s) of SQL files to check."
required: false
default: "**/*.sql"
catalog:
description: "Optional path to a catalog YAML (table/column types, known UDFs), passed to `provensql diff --catalog`."
required: false
default: ""
fail-on:
description: "When to fail the job: 'different' (proven behavior changes only), 'unknown' (also fail on undecidable), or 'never' (report only)."
required: false
default: "different"
comment:
description: "Post/update a summary comment on the pull request ('true' or 'false')."
required: false
default: "true"
provensql-version:
description: "PyPI version spec to install, e.g. '0.1.1'. Empty installs the latest."
required: false
default: ""
python-version:
description: "Python version used to run provensql."
required: false
default: "3.13"
github-token:
description: "Token used to post the PR comment. Defaults to the workflow token."
required: false
default: ${{ github.token }}
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install provensql
shell: bash
run: |
if [ -n "${{ inputs.provensql-version }}" ]; then
pip install "provensql==${{ inputs.provensql-version }}"
else
pip install provensql
fi
- name: Run provensql on changed SQL
shell: bash
env:
PROVENSQL_PATHS: ${{ inputs.paths }}
PROVENSQL_CATALOG: ${{ inputs.catalog }}
PROVENSQL_FAIL_ON: ${{ inputs.fail-on }}
PROVENSQL_COMMENT: ${{ inputs.comment }}
GITHUB_TOKEN: ${{ inputs.github-token }}
run: python "$GITHUB_ACTION_PATH/provensql_ci.py"