Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"permissions": {
"allow": [
"Bash(mix compile:*)",
"Bash(mix test:*)",
"Bash(mix format:*)",
"Bash(sqlite3:*)",
"WebFetch(domain:github.com)",
"WebFetch(domain:raw.githubusercontent.com)",
"Bash(mix clean:*)",
"Bash(iex -S mix:*)"
],
"deny": [],
"ask": []
}
}
79 changes: 68 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Rust Checks
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
Expand Down Expand Up @@ -54,15 +54,74 @@ jobs:
- name: Run Rust tests
run: cargo test --manifest-path native/libsqlex/Cargo.toml --all-features

elixir-tests:
elixir-tests-latest:
name: Elixir 1.18.0 / OTP 27.0 / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
native/libsqlex/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.18.0'
otp-version: '27.0'

- name: Cache Mix dependencies
uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-1.18.0-27.0-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-1.18.0-27.0-

- name: Install Mix dependencies
run: mix deps.get

- name: Check Elixir formatting
run: mix format --check-formatted

- name: Compile (warnings as errors)
run: mix compile --warnings-as-errors

- name: Run Elixir tests
run: mix test

elixir-tests-compatibility:
name: Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: [elixir-tests-latest]
strategy:
fail-fast: false
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
elixir: ['1.18.0', '1.17.0']
otp: ['27.0', '26.2']
elixir: ['1.17.0']
otp: ['26.2']

steps:
- name: Checkout code
Expand Down Expand Up @@ -105,9 +164,6 @@ jobs:
- name: Install Mix dependencies
run: mix deps.get

- name: Check Elixir formatting
run: mix format --check-formatted

- name: Compile (warnings as errors)
run: mix compile --warnings-as-errors

Expand All @@ -117,7 +173,7 @@ jobs:
integration-test:
name: Integration Tests
runs-on: ubuntu-latest
needs: [rust-checks, elixir-tests]
needs: [rust-checks, elixir-tests-latest, elixir-tests-compatibility]

steps:
- name: Checkout code
Expand Down Expand Up @@ -154,14 +210,15 @@ jobs:
all-checks-pass:
name: All Checks Pass
runs-on: ubuntu-latest
needs: [rust-checks, elixir-tests, integration-test]
needs: [rust-checks, elixir-tests-latest, elixir-tests-compatibility, integration-test]
if: always()

steps:
- name: Check if all jobs passed
run: |
if [ "${{ needs.rust-checks.result }}" != "success" ] || \
[ "${{ needs.elixir-tests.result }}" != "success" ] || \
[ "${{ needs.elixir-tests-latest.result }}" != "success" ] || \
[ "${{ needs.elixir-tests-compatibility.result }}" != "success" ] || \
[ "${{ needs.integration-test.result }}" != "success" ]; then
echo "One or more checks failed"
exit 1
Expand Down
Loading