Skip to content

Commit b5ceb68

Browse files
committed
Merge remote-tracking branch 'origin/master' into active-record
2 parents cb5afe4 + 1507545 commit b5ceb68

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

.github/workflows/crystal.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ concurrency:
1717

1818
jobs:
1919
build:
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
os: [ubuntu-latest]
24-
crystal: ["1.15.1"]
20+
runs-on: ubuntu-latest
21+
container:
22+
image: crystallang/crystal:1.15.1
2523

26-
runs-on: ${{ matrix.os }}
2724
services:
2825
postgres:
2926
image: postgres
@@ -39,12 +36,11 @@ jobs:
3936
--health-timeout=5s
4037
--health-retries=5
4138
steps:
42-
- name: Download source
43-
uses: actions/checkout@v4
44-
- name: Install Crystal
45-
uses: crystal-lang/install-crystal@v1
46-
with:
47-
crystal: ${{ matrix.crystal }}
39+
- uses: actions/checkout@v4
40+
- name: Update package list and install SQLite and development files
41+
run: |
42+
apt-get update
43+
apt-get install -y sqlite3 libsqlite3-dev
4844
- name: Verify SQLite installation
4945
run: sqlite3 --version
5046
- name: Create SQLite databases
@@ -62,7 +58,14 @@ jobs:
6258
- name: Check formatting
6359
run: crystal tool format --check
6460
- name: Check code linting with Ameba
65-
run: bin/ameba --fix -f progress
61+
run: bin/ameba
62+
- name: Wait for Postgres
63+
run: |
64+
for i in {1..30}; do
65+
pg_isready -h postgres -U example && break
66+
echo "Waiting for postgres..."
67+
sleep 1
68+
done
6669
- name: Run tests
6770
env:
6871
DATABASE_URL: postgres://example:example@postgres:5432/example

shard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cql
2-
version: 0.0.162
2+
version: 0.0.176
33
authors:
44
- Elias Perez <[email protected]>
55
crystal: '>= 1.12.2'

spec/integration/adapters/sqlite_schema_spec.cr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ describe CQL::Schema do
5050
.into(:customers)
5151
.values(
5252
name: customer.name,
53+
email: customer.email,
5354
city: customer.city,
5455
balance: customer.balance
5556
).commit
@@ -68,6 +69,7 @@ describe CQL::Schema do
6869
.into(:customers)
6970
.values(
7071
name: customer.name,
72+
email: customer.email,
7173
city: customer.city,
7274
balance: customer.balance
7375
).commit
@@ -78,7 +80,7 @@ describe CQL::Schema do
7880

7981
it "creates a schema" do
8082
Data.tables.size.should eq(2)
81-
Data.tables[:customers].columns.size.should eq(6)
83+
Data.tables[:customers].columns.size.should eq(7)
8284
end
8385

8486
it "add a column to an existing table" do
@@ -90,7 +92,7 @@ describe CQL::Schema do
9092
end
9193

9294
column_exists.call(:country, :customers).should eq(1)
93-
Data.tables[:customers].columns.size.should eq(7)
95+
Data.tables[:customers].columns.size.should eq(8)
9496
end
9597

9698
it "drops a column from an existing table" do
@@ -104,7 +106,7 @@ describe CQL::Schema do
104106
end
105107

106108
column_exists.call(:city, :customers).should eq(0)
107-
Data.tables[:customers].columns.size.should eq(6)
109+
Data.tables[:customers].columns.size.should eq(7)
108110
end
109111

110112
it "adds an index to a table" do

spec/support/schemas/data_schema.cr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Data = CQL::Schema.define(
55
table :customers do
66
primary :id, Int32
77
column :name, String
8+
column :email, String
89
column :city, String
910
column :balance, Int32
1011
timestamps

0 commit comments

Comments
 (0)