Skip to content

Commit

Permalink
Update CI/deps to support Crystal 0.32.1 (amberframework#1173)
Browse files Browse the repository at this point in the history
* [No Ticket] Updates Dependencies

New releases for DB, PG, MySQL and SQLite3 have been release that are
breaking building new amber apps.

This updates the shard.yml to use the latest versions for these projects

Cleanup compose file and granite spec

Cleanup once per context

Use Ameba v0.11.0

Remove commit and ~> from versions

Remove ~> from shard yanml

Bump micrate to 0.5.0

Remove ~> from micrate

Bump amber version

Remove shards check

* Update version in .crystal-version
  • Loading branch information
eliasjpr committed Jan 24, 2020
1 parent 1faddc2 commit 3fcc6ca
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .crystal-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.31.1
0.32.1
12 changes: 6 additions & 6 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 0.32.0
authors:
- Amber Team and Contributors <amberframework.org>

crystal: 0.31.1
crystal: 0.32.1

license: MIT

Expand Down Expand Up @@ -36,19 +36,19 @@ dependencies:

micrate:
github: amberframework/micrate
version: ~> 0.4.0
version: ~> 0.5.0

pg:
github: will/crystal-pg
version: ~> 0.19.0
version: ~> 0.20.0

mysql:
github: crystal-lang/crystal-mysql
version: ~> 0.9.0
version: ~> 0.10.0

sqlite3:
github: crystal-lang/crystal-sqlite3
version: ~> 0.14.0
version: ~> 0.15.0

redis:
github: stefanwille/crystal-redis
Expand Down Expand Up @@ -76,4 +76,4 @@ dependencies:
development_dependencies:
ameba:
github: veelenga/ameba
version: ~> 0.10.0
version: ~> 0.11.0
34 changes: 6 additions & 28 deletions spec/build_spec_granite.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,44 @@ require "./build_spec_helper"

module Amber::CLI
describe "building a generated app using granite model and slang template" do
cleanup
generate_app("-t", "slang")

it "check formatting" do
generate_app("-t", "slang")
system("crystal tool format --check").should be_true
cleanup
end

it "shards update - dependencies" do
generate_app("-t", "slang")
system("shards update").should be_true
cleanup
end

it "shards check - dependencies" do
generate_app("-t", "slang")
system("shards check").should be_true
cleanup
end

it "shards build - generates a binary" do
generate_app("-t", "slang")
system("shards build #{TEST_APP_NAME}").should be_true
cleanup
end

it "executes specs" do
generate_app("-t", "slang")
system("crystal spec").should be_true
cleanup
end
end

describe "building a generated app using granite model and ecr template" do
cleanup
generate_app("-t", "ecr")

it "check formatting" do
generate_app("-t", "ecr")
system("crystal tool format --check").should be_true
cleanup
end

it "shards update - dependencies" do
generate_app("-t", "ecr")
system("shards update").should be_true
cleanup
end

it "shards check - dependencies" do
generate_app("-t", "ecr")
system("shards check").should be_true
cleanup
end

it "shards build - generates a binary" do
generate_app("-t", "ecr")
system("shards build #{TEST_APP_NAME}").should be_true
cleanup
end

it "executes specs" do
generate_app("-t", "ecr")
system("crystal spec").should be_true
cleanup
end
end
end
1 change: 0 additions & 1 deletion spec/build_spec_helper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module Amber::CLI
cleanup
scaffold_app(TESTING_APP, *options)
system("shards install")

options = ["user:reference", "name:string", "body:text", "age:integer", "published:bool"]
temp_options = options - ["user:reference", "age:integer"]
MainCommand.run ["generate", "auth", "-y", "User"] | (options - ["user:reference"])
Expand Down
12 changes: 6 additions & 6 deletions src/amber/cli/templates/app/shard.yml.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:

granite:
github: amberframework/granite
version: ~> 0.18.0
version: ~> 0.19.0

quartz_mailer:
github: amberframework/quartz-mailer
Expand All @@ -36,22 +36,22 @@ dependencies:
<% case @database when "pg" -%>
pg:
github: will/crystal-pg
version: ~> 0.19.0
version: ~> 0.20.0
<% when "mysql" -%>
mysql:
github: crystal-lang/crystal-mysql
version: ~> 0.9.0
version: ~> 0.10.0
<% when "sqlite" -%>
sqlite3:
github: crystal-lang/crystal-sqlite3
version: ~> 0.14.0
version: ~> 0.15.0
<% end -%>

citrine-i18n:
github: amberframework/citrine-i18n
version: 0.4.0
version: ~> 0.4.0

development_dependencies:
garnet_spec:
github: amberframework/garnet-spec
version: 0.2.1
version: 0.2.0

0 comments on commit 3fcc6ca

Please sign in to comment.