Skip to content

Commit

Permalink
Merge branch 'main' into feature/35_sprint_retrospectives
Browse files Browse the repository at this point in the history
# Conflicts:
#	Gemfile
#	Gemfile.lock
#	app/controllers/leaves_controller.rb
#	app/controllers/pages_controller.rb
#	app/controllers/sprints_controller.rb
#	app/models/leave.rb
#	app/models/sprint_feedback.rb
#	app/models/sprint_metrics.rb
#	app/views/pages/home.html.slim
#	app/views/sprints/_sprint.html.slim
#	app/views/sprints/index.html.slim
#	config/locales/en.yml
#	db/schema.rb
  • Loading branch information
danieldiekmeier committed Jul 25, 2024
2 parents f06253c + 3d02f27 commit 0447d03
Show file tree
Hide file tree
Showing 145 changed files with 2,969 additions and 984 deletions.
42 changes: 42 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "nerdgeschoss",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"postCreateCommand": "bin/setup",
"remoteUser": "root",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"GitHub.copilot",
"esbenp.prettier-vscode",
"sianglim.slim",
"Shopify.ruby-lsp",
"EditorConfig.EditorConfig",
"eamodio.gitlens",
"GraphQL.vscode-graphql",
"bierner.markdown-mermaid"
],
"settings": {
"typescript.tsdk": "node_modules/typescript/lib",
"rubyLsp.rubyVersionManager": "none",
"[ruby]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "Shopify.ruby-lsp"
}
}
}
},
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1": {}
},
"forwardPorts": [
6080
],
"portsAttributes": {
"6080": {
"label": "playwright"
}
}
}
36 changes: 36 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '3'

services:
app:
image: ghcr.io/nerdgeschoss/nerdgeschoss/development-environment:3.3-18
volumes:
- ../..:/workspaces:cached
- nerdgeschoss_app-node_modules:/workspaces/nerdgeschoss_app/node_modules

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db

environment:
REDIS_URL: redis://redis:6379
TZ: Europe/Berlin

db:
image: postgres:15.1
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis
restart: unless-stopped
volumes:
- redis-data:/data

volumes:
postgres-data:
redis-data:
nerdgeschoss_app-node_modules:
5 changes: 0 additions & 5 deletions .env

This file was deleted.

2 changes: 0 additions & 2 deletions .env.development

This file was deleted.

1 change: 0 additions & 1 deletion .env.test

This file was deleted.

32 changes: 11 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ on: [push]

env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
RAILS_ENV: test
DATABASE_URL: postgres://postgres:[email protected]:5432/app
RSPEC_RETRY_RETRY_COUNT: 3
SCREENSHOTS: '1'

jobs:
ruby:
runs-on: ubuntu-20.04

services:
postgres:
image: postgres:12
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -20,16 +24,12 @@ jobs:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:latest
ports:
- 6379:6379

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '18.x'
cache: yarn
- name: Install yarn
run: yarn install
Expand All @@ -43,26 +43,16 @@ jobs:
run: bundle exec i18n-tasks health
- name: Check Model Annotations
run: bundle exec annotate --models && bin/git_tracked_are_unmodified
env:
DATABASE_URL: postgres://postgres:[email protected]:5432/app
RAILS_ENV: test
- name: JS Lint
run: yarn lint
- name: Build Assets
run: yarn build
- name: Install Playwright Browsers
run: npx --yes playwright install --with-deps chromium
- name: Build
run: bundle exec rails assets:precompile
- name: Create PG Database
run: bundle exec rake db:create db:migrate
env:
DATABASE_URL: postgres://postgres:[email protected]:5432/app
RAILS_ENV: test
- name: Build and test with Rake
- name: Build and test with RSpec
run: bundle exec rspec --format documentation
env:
DATABASE_URL: postgres://postgres:[email protected]:5432/app
REDIS_URL: redis://127.0.0.1:6379
RAILS_ENV: test
RSPEC_RETRY_RETRY_COUNT: 3
SCREENSHOTS: '1'
- name: Upload Screenshots
if: always()
run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@
app/assets/builds
node_modules
.DS_Store

*.env
/public/vite-dev
/public/vite-test
6 changes: 1 addition & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 3.1
SuggestExtensions: false

inherit_gem:
shimmer: config/rubocop_base.yml
Expand All @@ -14,10 +14,6 @@ RSpec:
Naming/MemoizedInstanceVariableName:
Enabled: true

# TODO: Move this to Shimmer
Performance/RedundantMerge:
MaxKeyValuePairs: 1

RSpec/ExpectChange:
Enabled: true
EnforcedStyle: block
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.4
3.3.1
4 changes: 0 additions & 4 deletions .solargraph.yml

This file was deleted.

47 changes: 40 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,47 @@
"version": "0.2.0",
"configurations": [
{
"type": "rdbg",
"name": "Rails Server",
"name": "UI",
"type": "chrome",
"request": "launch",
"command": "bin/rails",
"script": "server",
"args": [],
"askParameters": false,
"useBundler": true
"url": "http://localhost:3000/",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "Sleepdelay"
},
{
"name": "Rails",
"type": "ruby_lsp",
"request": "launch",
"program": "bin/rails server"
},
{
"name": "Solid Queue",
"type": "ruby_lsp",
"request": "launch",
"program": "bin/rails solid_queue:start",
"preLaunchTask": "Sleepdelay"
},
{
"name": "Vite",
"type": "node-terminal",
"request": "launch",
"command": "yarn build --watch"
}
],
"compounds": [
{
"name": "Run App",
"configurations": [
"Vite",
"Rails",
"UI",
"Solid Queue"
],
"stopAll": true,
"presentation": {
"group": "1_dev",
"order": 1
}
}
]
}
6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

21 changes: 21 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Sleepdelay",
"type": "shell",
"command": "sleep 4",
"windows": {
"command": "ping 127.0.0.1 -n 4 > nul"
},
"group": "none",
"presentation": {
"reveal": "silent",
"panel": "new",
"close": true
}
}
]
}
23 changes: 9 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# frozen_string_literal: true

source "https://rubygems.org"
ruby File.read(".ruby-version").strip
ruby "~> #{File.read(File.join(__dir__, ".ruby-version")).strip}"

# Core
gem "puma"
gem "rails", "7.0.6"
gem "rails", "~> 7.1.3"

# Database
gem "pg"
gem "redis"

# Performance
gem "bootsnap", require: false
Expand All @@ -29,25 +28,22 @@ gem "icalendar", "~> 2.4"
gem "image_processing"
gem "kaminari"
gem "mini_magick"
gem "mission_control-jobs"
gem "pundit"
gem "rails-i18n"
gem "shimmer"
gem "sidekiq"
gem "sidekiq-scheduler"
gem "sitemap_generator"
gem "slim-rails"
gem "solid_queue"
gem "time_will_tell"
gem "translate_client"
gem "yael"
gem "redcarpet"
gem "faker"

# Assets
gem "autoprefixer-rails"
gem "jsbundling-rails"
gem "sassc-rails"
gem "serviceworker-rails"
gem "sprockets"
gem "sprockets-rails"
gem "vite_rails"
gem "stimulus-rails"
gem "turbo-rails"

Expand All @@ -61,7 +57,7 @@ gem "sentry-ruby"
group :development, :test do
gem "capybara"
gem "capybara-screenshot-diff"
gem "cuprite"
gem "capybara-playwright-driver"
gem "i18n-tasks"
gem "rack_session_access"
gem "rspec-rails"
Expand All @@ -73,15 +69,14 @@ group :development, :test do
gem "rubocop-rake"
gem "webmock", require: false
gem "debug"
gem "pundit-matchers"
end

group :development do
gem "annotate"
gem "guard"
gem "guard-rspec"
gem "letter_opener"
gem "listen"
gem "rb-fsevent"
gem "solargraph-standardrb"
gem "web-console"
gem "ruby-lsp-rspec", require: false
end
Loading

0 comments on commit 0447d03

Please sign in to comment.