-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from PhlexUI/qol-improvements
Add Overmind to bin/dev, implement Heroku deploy, and clean up Gemfile
- Loading branch information
Showing
3 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: CI | |
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
- "*" | ||
push: | ||
branches: | ||
- main | ||
|
@@ -37,7 +37,6 @@ jobs: | |
- name: Lint code for consistent style | ||
run: bundle exec standardrb | ||
|
||
|
||
test: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
|
@@ -48,15 +47,15 @@ jobs: | |
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: test | ||
ports: ['5432:5432'] | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
redis: | ||
image: redis | ||
ports: ['6379:6379'] | ||
ports: ["6379:6379"] | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 10s | ||
|
@@ -74,7 +73,7 @@ jobs: | |
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.tool-versions' | ||
node-version-file: ".tool-versions" | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
|
@@ -93,4 +92,18 @@ jobs: | |
bin/rails test:prepare | ||
bin/rails db:test:prepare | ||
bin/rails test | ||
bin/rails test:system | ||
deploy-development: | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
needs: [lint, test] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Deploy to Heroku | ||
uses: akhileshns/[email protected] | ||
with: | ||
branch: main | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: "phlex-ui-web" | ||
heroku_email: "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/usr/bin/env sh | ||
|
||
if ! gem list foreman -i --silent; then | ||
echo "Installing foreman..." | ||
gem install foreman | ||
fi | ||
#!/usr/bin/env bash | ||
|
||
# Default to port 3000 if not specified | ||
export PORT="${PORT:-3000}" | ||
|
||
exec foreman start -f Procfile.dev "$@" | ||
if command -v overmind &>/dev/null; then | ||
exec overmind start -f Procfile.dev "$@" | ||
else | ||
if ! gem list foreman -i --silent; then | ||
echo "Installing foreman..." | ||
gem install foreman | ||
fi | ||
foreman start -f Procfile.dev "$@" | ||
fi |