Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Sep 20, 2024
1 parent 3decd7b commit 5c68d9d
Show file tree
Hide file tree
Showing 13 changed files with 148 additions and 303 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,36 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true

- name: Installing dependencies (ubuntu)
- name: Installing dependencies
if: matrix.os == 'ubuntu'
run: |
sudo systemctl stop mysql
sudo apt-get install libmariadb-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true

- name: Setup database
run: |
VARIANT=testing bundle exec bake migrate
- name: Run tests
timeout-minutes: 5
run: ${{matrix.env}} bundle exec rspec

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true

- name: Run tests...
run: bundle exec sus

deploy:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v1

- name: Push to remote system
env:
DEPLOY_KEY: ${{secrets.deploy_key}}
Expand Down
29 changes: 0 additions & 29 deletions Guardfile

This file was deleted.

5 changes: 5 additions & 0 deletions config/sus.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

require 'variant'
Variant.force!(:testing)

require_relative '../db/environment'
27 changes: 27 additions & 0 deletions fixtures/website_context.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

require 'rack/test'
require 'protocol/rack/adapter'
require 'protocol/http/reference'

require 'sus/fixtures/async/http/server_context'
require 'sus/fixtures/async/webdriver/session_context'

require 'falcon/middleware/verbose'

module WebsiteContext
include Sus::Fixtures::Async::HTTP::ServerContext
include Sus::Fixtures::Async::WebDriver::SessionContext

def app
Rack::Builder.parse_file(
File.expand_path('../config.ru', __dir__)
)
end

def middleware
Falcon::Middleware::Verbose.new(
Protocol::Rack::Adapter.new(app)
)
end
end
109 changes: 29 additions & 80 deletions gems.locked
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ GEM
console (~> 1.26)
fiber-annotation
io-event (~> 1.6, >= 1.6.5)
async-actor (0.1.1)
async (>= 1)
async-await (0.7.0)
async
async-container (0.18.3)
Expand All @@ -41,16 +43,24 @@ GEM
async (>= 1.25)
metrics
traces
async-rspec (1.17.0)
rspec (~> 3.0)
rspec-files (~> 1.0)
rspec-memory (~> 1.0)
async-service (0.12.0)
async
async-container (~> 0.16)
async-webdriver (0.6.0)
async-actor (~> 0.1)
async-http (~> 0.61)
async-pool (~> 0.4)
async-websocket (~> 0.25)
base64 (~> 0.2)
async-websocket (0.30.0)
async-http (~> 0.76)
protocol-http (~> 0.34)
protocol-rack (~> 0.7)
protocol-websocket (~> 0.17)
bake (0.21.0)
bigdecimal
samovar (~> 2.1)
base64 (0.2.0)
benchmark-http (0.17.0)
async-await
async-http (~> 0.54)
Expand All @@ -60,7 +70,6 @@ GEM
xrb-sanitize
bigdecimal (3.1.8)
build-files (1.9.0)
coderay (1.1.3)
concurrent-ruby (1.3.4)
console (1.27.0)
fiber-annotation
Expand All @@ -77,7 +86,6 @@ GEM
async-pool
bigdecimal
ffi-module (~> 0.3.0)
diff-lcs (1.5.1)
falcon (0.48.0)
async
async-container (~> 0.18)
Expand All @@ -99,44 +107,19 @@ GEM
fiber-local (1.1.0)
fiber-storage
fiber-storage (1.0.0)
formatador (1.1.0)
guard (2.18.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-falcon (0.14.0)
console (~> 1.0)
falcon (~> 0.35)
guard
guard-compat (~> 1.2)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
http-accept (2.2.1)
io-endpoint (0.13.1)
io-event (1.6.5)
io-stream (0.4.1)
json (2.7.2)
latinum (1.8.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
localhost (1.3.1)
lumberjack (1.2.10)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
mapping (1.1.1)
method_source (1.1.0)
metrics (0.10.2)
migrate (0.3.1)
build-files (~> 1.7)
Expand All @@ -145,7 +128,6 @@ GEM
mime-types-data (3.2024.0903)
mini_mime (1.1.5)
msgpack (1.7.2)
nenv (0.3.0)
net-imap (0.4.16)
date
net-protocol
Expand All @@ -155,13 +137,6 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
openssl (3.2.0)
process-metrics (0.3.0)
console (~> 1.8)
Expand All @@ -177,44 +152,25 @@ GEM
protocol-rack (0.8.0)
protocol-http (~> 0.27)
rack (>= 1.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.8.1)
protocol-websocket (0.17.0)
protocol-http (~> 0.2)
rack (3.1.7)
rack-test (2.1.0)
rack (>= 1.3)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.7)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-files (1.1.3)
rspec (~> 3.0)
rspec-memory (1.0.4)
rspec (~> 3.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubyzip (2.3.2)
samovar (2.3.0)
console (~> 1.0)
mapping (~> 1.0)
selenium-webdriver (4.10.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shellany (0.0.1)
thor (1.3.2)
sus (0.31.0)
sus-fixtures-async (0.2.0)
async
sus (~> 0.10)
sus-fixtures-async-http (0.9.0)
async-http (~> 0.54)
sus (~> 0.31)
sus-fixtures-async (~> 0.1)
sus-fixtures-async-webdriver (0.2.0)
async-webdriver (~> 0.3)
thread-local (1.1.0)
timeout (0.4.1)
traces (0.13.1)
Expand All @@ -238,11 +194,6 @@ GEM
xrb (~> 0.4)
variant (0.1.1)
thread-local
webdrivers (5.3.1)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0, < 4.11)
websocket (1.2.11)
xrb (0.6.1)
xrb-sanitize (0.7.1)
xrb (~> 0.3)
Expand All @@ -252,7 +203,6 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
async-rspec
bake
benchmark-http
bundler
Expand All @@ -262,18 +212,17 @@ DEPENDENCIES
db-migrate!
db-model!
falcon
guard-falcon
guard-rspec
latinum (~> 1.0)
mapping (~> 1.0)
migrate
rack-test
rexml
rspec
sus
sus-fixtures-async-http
sus-fixtures-async-webdriver (~> 0.2)
trenni-formatters (~> 2.0)
utopia (~> 2.17)
variant
webdrivers

BUNDLED WITH
2.5.16
14 changes: 6 additions & 8 deletions gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,16 @@
gem 'bundler'
gem 'rack-test'

group :development do
gem 'guard-falcon', require: false
gem 'guard-rspec', require: false
group :test do
gem "sus"
gem 'covered'

gem "sus-fixtures-async-http"
gem "sus-fixtures-async-webdriver", "~> 0.2"

gem 'webdrivers'
# Fixed in latest selenium <https://github.com/SeleniumHQ/selenium/pull/9007>:
gem 'rexml'

gem 'rspec'
gem 'covered'

gem 'async-rspec'
gem 'benchmark-http'
end

Expand Down
32 changes: 0 additions & 32 deletions spec/pages/login_spec.rb

This file was deleted.

Loading

0 comments on commit 5c68d9d

Please sign in to comment.