Skip to content

Commit f847d48

Browse files
Merge pull request #7 from davidsmfreire/dev
Major update
2 parents b59e0e5 + 2ba079b commit f847d48

122 files changed

Lines changed: 10870 additions & 846 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{yml,yaml,toml,json,md}]
12+
indent_size = 2
13+
14+
[Makefile]
15+
indent_style = tab
16+
17+
[*.md]
18+
trim_trailing_whitespace = false
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Bug report
2+
description: Something sqlshield does that it shouldn't (or vice versa).
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
id: what-happened
7+
attributes:
8+
label: What happened?
9+
description: Describe the unexpected behavior.
10+
placeholder: sqlshield reports ... but it should ...
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: repro
15+
attributes:
16+
label: Minimal reproducer
17+
description: |
18+
Paste the source snippet, schema SQL, and command you ran.
19+
Keep it as small as possible.
20+
render: text
21+
validations:
22+
required: true
23+
- type: input
24+
id: version
25+
attributes:
26+
label: sqlshield version
27+
description: "Output of `sqlshield --version`."
28+
validations:
29+
required: true
30+
- type: input
31+
id: platform
32+
attributes:
33+
label: Platform
34+
description: "OS + architecture, e.g. `Linux x86_64`, `macOS arm64`."
35+
validations:
36+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Feature request
2+
description: Propose new functionality or a change in behavior.
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem / motivation
9+
description: What can't you do today? Who is affected?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: proposal
14+
attributes:
15+
label: Proposed solution
16+
description: How should sqlshield behave? Sketch the CLI/API if relevant.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: alternatives
21+
attributes:
22+
label: Alternatives considered

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Summary
2+
3+
<!-- What does this PR change and why? Link issues with `Fixes #NN` if applicable. -->
4+
5+
## How I tested it
6+
7+
<!-- Commands you ran, fixtures you added, manual steps. -->
8+
9+
## Checklist
10+
11+
- [ ] `cargo fmt --all --check` passes
12+
- [ ] `cargo clippy --all-targets --all-features -- -D warnings` passes
13+
- [ ] `cargo test --workspace --all-features` passes
14+
- [ ] Commit messages follow Conventional Commits
15+
- [ ] CHANGELOG entry added under `[Unreleased]` (skip if release-plz handles it)

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
groups:
9+
tree-sitter:
10+
patterns:
11+
- "tree-sitter*"
12+
pyo3:
13+
patterns:
14+
- "pyo3*"
15+
16+
- package-ecosystem: github-actions
17+
directory: /
18+
schedule:
19+
interval: weekly
20+
21+
- package-ecosystem: pip
22+
directory: /
23+
schedule:
24+
interval: weekly

.github/workflows/audit.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: audit
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
schedule:
9+
- cron: "0 6 * * 1"
10+
11+
jobs:
12+
deny:
13+
name: cargo-deny
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: EmbarkStudios/cargo-deny-action@v2
18+
with:
19+
command: check

.github/workflows/ci.yml

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# This file is autogenerated by maturin v1.9.0
2+
# To update, run (from sqlshield-py/)
3+
#
4+
# maturin generate-ci github -o ../.github/workflows/ci.yml
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
tags:
14+
- '*'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
linux:
23+
runs-on: ${{ matrix.platform.runner }}
24+
strategy:
25+
matrix:
26+
platform:
27+
- runner: ubuntu-22.04
28+
target: x86_64
29+
- runner: ubuntu-22.04
30+
target: x86
31+
- runner: ubuntu-22.04
32+
target: aarch64
33+
- runner: ubuntu-22.04
34+
target: armv7
35+
- runner: ubuntu-22.04
36+
target: s390x
37+
- runner: ubuntu-22.04
38+
target: ppc64le
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: 3.x
44+
- name: Build wheels
45+
uses: PyO3/maturin-action@v1
46+
env:
47+
CFLAGS: "-std=gnu11"
48+
with:
49+
working-directory: sqlshield-py
50+
target: ${{ matrix.platform.target }}
51+
args: --release --out ../dist --find-interpreter
52+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
53+
manylinux: auto
54+
- name: Upload wheels
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: wheels-linux-${{ matrix.platform.target }}
58+
path: dist
59+
60+
musllinux:
61+
runs-on: ${{ matrix.platform.runner }}
62+
strategy:
63+
matrix:
64+
platform:
65+
- runner: ubuntu-22.04
66+
target: x86_64
67+
- runner: ubuntu-22.04
68+
target: x86
69+
- runner: ubuntu-22.04
70+
target: aarch64
71+
- runner: ubuntu-22.04
72+
target: armv7
73+
steps:
74+
- uses: actions/checkout@v4
75+
- uses: actions/setup-python@v5
76+
with:
77+
python-version: 3.x
78+
- name: Build wheels
79+
uses: PyO3/maturin-action@v1
80+
env:
81+
CFLAGS: "-std=gnu11"
82+
with:
83+
working-directory: sqlshield-py
84+
target: ${{ matrix.platform.target }}
85+
args: --release --out ../dist --find-interpreter
86+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
87+
manylinux: musllinux_1_2
88+
- name: Upload wheels
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: wheels-musllinux-${{ matrix.platform.target }}
92+
path: dist
93+
94+
windows:
95+
runs-on: ${{ matrix.platform.runner }}
96+
strategy:
97+
matrix:
98+
platform:
99+
- runner: windows-latest
100+
target: x64
101+
- runner: windows-latest
102+
target: x86
103+
steps:
104+
- uses: actions/checkout@v4
105+
- uses: actions/setup-python@v5
106+
with:
107+
python-version: 3.x
108+
architecture: ${{ matrix.platform.target }}
109+
- name: Build wheels
110+
uses: PyO3/maturin-action@v1
111+
with:
112+
working-directory: sqlshield-py
113+
target: ${{ matrix.platform.target }}
114+
args: --release --out ../dist --find-interpreter
115+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
116+
- name: Upload wheels
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: wheels-windows-${{ matrix.platform.target }}
120+
path: dist
121+
122+
macos:
123+
runs-on: ${{ matrix.platform.runner }}
124+
strategy:
125+
matrix:
126+
platform:
127+
- runner: macos-13
128+
target: x86_64
129+
- runner: macos-14
130+
target: aarch64
131+
steps:
132+
- uses: actions/checkout@v4
133+
- uses: actions/setup-python@v5
134+
with:
135+
python-version: 3.x
136+
- name: Build wheels
137+
uses: PyO3/maturin-action@v1
138+
with:
139+
working-directory: sqlshield-py
140+
target: ${{ matrix.platform.target }}
141+
args: --release --out ../dist --find-interpreter
142+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
143+
- name: Upload wheels
144+
uses: actions/upload-artifact@v4
145+
with:
146+
name: wheels-macos-${{ matrix.platform.target }}
147+
path: dist
148+
149+
sdist:
150+
runs-on: ubuntu-latest
151+
steps:
152+
- uses: actions/checkout@v4
153+
- name: Build sdist
154+
uses: PyO3/maturin-action@v1
155+
with:
156+
working-directory: sqlshield-py
157+
command: sdist
158+
args: --out ../dist
159+
- name: Upload sdist
160+
uses: actions/upload-artifact@v4
161+
with:
162+
name: wheels-sdist
163+
path: dist
164+
165+
release:
166+
name: Release
167+
runs-on: ubuntu-latest
168+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
169+
needs: [linux, musllinux, windows, macos, sdist]
170+
permissions:
171+
# Use to sign the release artifacts
172+
id-token: write
173+
# Used to upload release artifacts
174+
contents: write
175+
# Used to generate artifact attestation
176+
attestations: write
177+
steps:
178+
- uses: actions/download-artifact@v4
179+
- name: Generate artifact attestation
180+
uses: actions/attest-build-provenance@v2
181+
with:
182+
subject-path: 'wheels-*/*'
183+
- name: Publish to PyPI
184+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
185+
uses: PyO3/maturin-action@v1
186+
env:
187+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
188+
with:
189+
command: upload
190+
args: --non-interactive --skip-existing wheels-*/*

.github/workflows/release-plz.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: release-plz
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
release-plz:
14+
name: release-plz
15+
runs-on: ubuntu-latest
16+
if: ${{ github.repository_owner == 'davidsmfreire' }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- uses: dtolnay/rust-toolchain@stable
22+
- name: release-plz
23+
uses: MarcoIeni/release-plz-action@v0.5
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)