-
Notifications
You must be signed in to change notification settings - Fork 0
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 #18 from aifoundry-org/vadim/remove-unused-components
Remove unused components, improve styles and docker compose
- Loading branch information
Showing
190 changed files
with
1,723 additions
and
1,779 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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Ruby with PostgreSQL | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: ['3.3.0'] | ||
|
||
services: | ||
db: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: test_db | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby and PostgreSQL | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
mirror: 'bd' # Use the Brazilian mirror for faster downloads | ||
|
||
- name: Install PostgreSQL client | ||
run: | | ||
sudo apt-get install postgresql-client | ||
- name: Wait for PostgreSQL to be ready | ||
run: | | ||
until pg_isready -h localhost -p 5432 -U postgres; do | ||
echo "Waiting for PostgreSQL to start..." | ||
sleep 1 | ||
done | ||
- name: Generate creds file | ||
run: | | ||
EDITOR="mate --wait" ./bin/rails credentials:edit | ||
- name: Install Node.js and Yarn | ||
run: | | ||
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
npm install -g yarn | ||
- name: Yarn install | ||
run: | | ||
yarn install | ||
- name: Precompile assets | ||
run: | | ||
SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile | ||
- name: Setup database schema | ||
run: | | ||
# Replace with your database setup commands (e.g., migrations) | ||
bundle exec rake db:create db:schema:load | ||
- name: Run tests | ||
run: bundle exec rspec | ||
|
||
- name: Run rubocop | ||
run: bundle exec rubocop -DES |
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 |
---|---|---|
|
@@ -38,3 +38,4 @@ | |
|
||
/app/assets/builds/* | ||
!/app/assets/builds/.keep | ||
.DS_Store |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--require spec_helper | ||
--format documentation |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2024-07-15 13:37:11 UTC using RuboCop version 1.65.0. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. | ||
# Include: **/*.gemfile, **/Gemfile, **/gems.rb | ||
Bundler/OrderedGems: | ||
Exclude: | ||
- 'Gemfile' | ||
|
||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. | ||
Metrics/AbcSize: | ||
Max: 66 | ||
|
||
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. | ||
# AllowedMethods: refine | ||
Metrics/BlockLength: | ||
Max: 155 | ||
|
||
# Configuration parameters: AllowedMethods, AllowedPatterns. | ||
Metrics/CyclomaticComplexity: | ||
Max: 9 | ||
|
||
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. | ||
Metrics/MethodLength: | ||
Max: 74 | ||
|
||
# Configuration parameters: AllowedMethods, AllowedPatterns. | ||
Metrics/PerceivedComplexity: | ||
Max: 9 | ||
|
||
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns. | ||
# SupportedStyles: snake_case, normalcase, non_integer | ||
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64 | ||
Naming/VariableNumber: | ||
Exclude: | ||
- 'spec/controllers/*' | ||
- 'spec/controllers/*' | ||
|
||
# Configuration parameters: AllowedConstants. | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/IfUnlessModifier: | ||
Exclude: | ||
- 'bin/bundle' | ||
|
||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. | ||
# URISchemes: http, https | ||
Layout/LineLength: | ||
Max: 198 |
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
Oops, something went wrong.