Skip to content

Commit

Permalink
Improve ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hunchr committed Nov 7, 2024
1 parent e0ca9e7 commit 42ccd84
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
ruby-version: ${{ matrix.ruby }}

- name: Set up Hotsheet
run: bundle && bundle exec appraisal install && bundle exec rails db:create db:schema:load
run: bin/setup

- name: Run tests
run: bundle exec appraisal bin/check
run: bin/check

lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions bin/check
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
set -eu
set -e

bundle exec rspec --fail-fast=3 -f documentation
bundle exec appraisal "$@" rspec --fail-fast=3 -f documentation
4 changes: 2 additions & 2 deletions bin/fastcheck
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
set -eu
set -e

bundle exec rubocop -c .rubocop.yml
bundle exec rubocop -c .rubocop.yml "$@"
11 changes: 7 additions & 4 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/usr/bin/env sh
set -eu
set -e

echo ---- Installing dependencies ----
bundle
cd spec/dummy
bundle
bundle exec appraisal install

echo ---- Setting up database ----
bundle exec rails db:drop db:setup
if [ -n "$CI" ]; then
bundle exec rails db:create db:schema:load
else
bundle exec rails db:drop db:setup
fi

0 comments on commit 42ccd84

Please sign in to comment.