Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed Dashboard Navigation draft #2

Merged
80 commits merged into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
233bc13
add user controller and routes
YashPhatak Sep 28, 2024
4f45daf
add validations
YashPhatak Sep 28, 2024
647b3a2
controller functions
YashPhatak Sep 28, 2024
3fa49b6
Completed Dashboard Navigation draft
Sep 30, 2024
5c415a9
run rubocop
Sep 30, 2024
9717f28
Adds a step in ci.yml to check test coverage is greater than 90%
kushalnl7 Oct 1, 2024
d5ea23d
Modifies rubocop step to allow at most 1 offense per file
kushalnl7 Oct 1, 2024
74872cf
Adds simplecov gem to the GEMFILE
kushalnl7 Oct 1, 2024
5475523
Adds a few more gems to GEMFILE for testing purpose
kushalnl7 Oct 1, 2024
8997612
Adds a new job in ci.yml to check for cucumber feature coverage to be…
kushalnl7 Oct 1, 2024
fe97761
Enables ci.yml to run for every push on any branch
kushalnl7 Oct 1, 2024
ba357c6
Resolves rubocop offenses
kushalnl7 Oct 1, 2024
e03220a
Adds step to run database migrations
kushalnl7 Oct 1, 2024
2e2f05c
add validations
YashPhatak Oct 1, 2024
2a4d651
Modifies 'Check test coverage' step in ci.yml
kushalnl7 Oct 1, 2024
10128fb
Modifies 'Run tests' step in ci.yml
kushalnl7 Oct 1, 2024
333f51c
Resolves rubocop offense
kushalnl7 Oct 1, 2024
f4bc384
Modifies test job in ci.yml
kushalnl7 Oct 1, 2024
e87baa3
Modifies code to resolve issue regrading test job failure
kushalnl7 Oct 1, 2024
f73f22c
created the table users
MrunmayD25 Oct 1, 2024
bc2b1a2
Modifies code to resolve cucumber scenarios issue in ci
kushalnl7 Oct 1, 2024
0afe8d3
Modifies code to resolve issues in ci
kushalnl7 Oct 1, 2024
a64e864
Modifies test_helper.rb to resolve issues in ci
kushalnl7 Oct 1, 2024
e0ed568
Modifies ci.yml to add bundle install step
kushalnl7 Oct 1, 2024
109604f
Modifies simplecov.rb to resolve issues in ci
kushalnl7 Oct 1, 2024
0c188bb
Modifies GEMFILE to resolve issues in ci
kushalnl7 Oct 1, 2024
e268aa2
Modifies ci.yml to resolve issues in ci pipeline
kushalnl7 Oct 1, 2024
e0a1e41
Modifies simpleCov.rb to resolve issues in ci pipeline
kushalnl7 Oct 1, 2024
c235e11
Adds a debug step in ci.yml
kushalnl7 Oct 1, 2024
d2778c6
Adds a debug step in ci.yml
kushalnl7 Oct 1, 2024
43ff49b
Modifies test_helper.rb to resolve issues in ci
kushalnl7 Oct 1, 2024
1da2c5f
Modifies ci.yml to resolve issues in ci pipeline
kushalnl7 Oct 1, 2024
acd6674
Setup Google Auth
Barry0304 Oct 1, 2024
b81ff14
registeration page
wcc1101 Oct 1, 2024
fe064f8
Modifies ci.yml file to resolve test issues
kushalnl7 Oct 1, 2024
768b09b
merge with Flora's work
wcc1101 Oct 1, 2024
0f72aa8
Modifies ci.yml file to resolve test issues
kushalnl7 Oct 1, 2024
3eefea5
Modifies test_helper to resolve test issues
kushalnl7 Oct 1, 2024
474b006
Modifies GEMFILE to resolve test issues
kushalnl7 Oct 1, 2024
f179ab1
database migrated
MrunmayD25 Oct 1, 2024
55f3a52
merge David
Oct 2, 2024
7dec157
test
Oct 2, 2024
7be5d2d
prfile mangement page
Oct 2, 2024
8e2719b
fix rubocop
Oct 2, 2024
3499c45
Modifies code to resolve ci issues
kushalnl7 Oct 2, 2024
ec09767
Creates integartion branch
kushalnl7 Oct 2, 2024
4f5e446
changes
YashPhatak Oct 2, 2024
eabb4b4
add user controller and routes
YashPhatak Sep 28, 2024
fc76701
add validations
YashPhatak Sep 28, 2024
70c8df5
controller functions
YashPhatak Sep 28, 2024
0dda739
add validations
YashPhatak Oct 1, 2024
4ee081d
changes
YashPhatak Oct 2, 2024
07c24b6
Merge pull request #5 from tamu-edu-students/yash-backend
kushalnl7 Oct 2, 2024
0ee08f2
Clears migration file
kushalnl7 Oct 2, 2024
7f9138f
Merge pull request #6 from tamu-edu-students/mrunmay_database
kushalnl7 Oct 2, 2024
572345a
Merge branch 'integration' into Flora-Frontend
kushalnl7 Oct 2, 2024
4983502
Merge pull request #8 from tamu-edu-students/Flora-Frontend
kushalnl7 Oct 2, 2024
64329d7
Merges all feature branches
kushalnl7 Oct 2, 2024
594336d
Resolves issues with migration conflicts
kushalnl7 Oct 2, 2024
28f0fcf
integrate user registration frontend with backend
YashPhatak Oct 3, 2024
0933add
display error messages for incorrect form details
YashPhatak Oct 3, 2024
7fd064b
update Google Oauth key
Barry0304 Oct 3, 2024
33fff8c
add changes
YashPhatak Oct 3, 2024
f560f24
Update test case for login page
Oct 3, 2024
38f98db
Merge branch 'Randy-dev' of https://github.com/tamu-edu-students/jimm…
Oct 3, 2024
993f548
allow spaces in name validation
YashPhatak Oct 4, 2024
44cd215
display error message on frontend if validation failed
YashPhatak Oct 4, 2024
4161e94
add team working agreement first version
YashPhatak Oct 4, 2024
8370820
add markdown file
YashPhatak Oct 4, 2024
a36cb17
remove pdf
YashPhatak Oct 4, 2024
a63f102
before try gpt's code
Barry0304 Oct 4, 2024
a29d316
add photo to profile and edit
wcc1101 Oct 4, 2024
c7087db
merged with Randy-dev for Google OAuth
Barry0304 Oct 4, 2024
a0d2b35
merge integration
Oct 4, 2024
89a1983
resolve merge conflict
YashPhatak Oct 4, 2024
4bca595
merge with integration
wcc1101 Oct 4, 2024
54e297d
Merge branch 'David-Frontend' into integration
wcc1101 Oct 4, 2024
94254d5
cucumber test for dashboard completed
Oct 4, 2024
1c2e0da
Feature: User Profile Management
wcc1101 Oct 4, 2024
03fd8dd
merge from david push to flora
Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
81 changes: 76 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: CI
on:
pull_request:
push:
branches: [ main ]

jobs:
scan_ruby:
Expand Down Expand Up @@ -51,7 +50,18 @@ jobs:
bundler-cache: true

- name: Lint code for consistent style
run: bin/rubocop -f github
run: |
bin/rubocop --format json --out rubocop_output.json

offenses_per_file=$(jq '.files[] | {path, offenses: (.offenses | length)} | select(.offenses > 1)' rubocop_output.json)

if [[ -n "$offenses_per_file" ]]; then
echo "There are files with more than 1 offense:"
echo "$offenses_per_file"
exit 1
else
echo "All files have 1 or fewer offenses."
fi

test:
runs-on: ubuntu-latest
Expand All @@ -75,11 +85,40 @@ jobs:
ruby-version: .ruby-version
bundler-cache: true

# - name: Run tests
# env:
# RAILS_ENV: test
- name: Install bundler
run: gem install bundler

- name: Install dependencies
run: |
bundle install

- name: Run database migrations
run: bin/rails db:migrate RAILS_ENV=test

- name: Prepare the test database
run: bin/rails db:test:prepare

- name: Debug installed gems
run: |
bundle exec gem list

- name: Run tests
env:
RAILS_ENV: test
# REDIS_URL: redis://localhost:6379/0
# run: bin/rails db:test:prepare test test:system
run: |
bundle exec rails test

- name: Check test coverage
run: |
covered_percent=$(ruby -r simplecov -e "puts SimpleCov.result.covered_percent")
if (( $(echo "$covered_percent < 90" | bc -l) )); then
echo "Code coverage is below 90%: $covered_percent%"
exit 1
else
echo "Code coverage is sufficient: $covered_percent%"
fi

- name: Keep screenshots from failed system tests
uses: actions/upload-artifact@v4
Expand All @@ -88,3 +127,35 @@ jobs:
name: screenshots
path: ${{ github.workspace }}/tmp/screenshots
if-no-files-found: ignore

cucumber_coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Install dependencies
run: bundle install

- name: Run Cucumber tests with coverage
run: |
bundle exec cucumber --format pretty --format html --out cucumber_report.html
if grep -q "coverage below" coverage/.last_run.json; then
echo "Test coverage is below the required threshold"
exit 1
else
echo "Test coverage meets the required threshold"
fi

- name: Upload Cucumber HTML Report
uses: actions/upload-artifact@v4
with:
name: cucumber-report
path: cucumber_report.html
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
25 changes: 23 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ ruby "3.3.4"
gem "rails", "~> 7.2.1"
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
# Use sqlite3 as the database for Active Record
gem "sqlite3", ">= 1.4"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma", ">= 5.0"
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
Expand All @@ -18,6 +16,12 @@ gem "turbo-rails"
gem "stimulus-rails"
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"

# omniauth for google login
gem "omniauth"
gem "omniauth-google-oauth2"
gem "omniauth-rails_csrf_protection"

# Use Redis adapter to run Action Cable in production
# gem "redis", ">= 4.0.1"

Expand All @@ -37,6 +41,9 @@ gem "bootsnap", require: false
# gem "image_processing", "~> 1.2"

group :development, :test do
# Use sqlite3 as the database for Active Record
gem "sqlite3", ">= 1.4"

# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri windows ], require: "debug/prelude"

Expand All @@ -45,15 +52,29 @@ group :development, :test do

# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
gem "rubocop-rails-omakase", require: false

gem "carrierwave", "~> 2.0"
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
gem "rubocop", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false
gem "rubocop-rspec", require: false
gem "rubycritic", require: false
end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"
gem "cucumber-rails", require: false
gem "database_cleaner"
gem "rails-controller-testing"
gem "rspec-rails"
gem "simplecov", require: false
gem "ZenTest"
# gem "codeclimate-test-reporter", require: nil
end
Loading
Loading