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

Move to github workflows #41

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
73 changes: 0 additions & 73 deletions .circleci/config.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/build_js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test superglue_js
on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
name: Test superglue.js
strategy:
fail-fast: false

runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup project
working-directory: ./superglue
run: npm install
- name: Lint
working-directory: ./superglue
run: npm run lint
- name: Test
working-directory: ./superglue
run: npm run test
40 changes: 40 additions & 0 deletions .github/workflows/build_rails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test superglue_rails
on:
push:
pull_request:
schedule:
- cron: '* * * * 1'
workflow_dispatch:

jobs:
build:
name: Ruby ${{ matrix.ruby }}. Rails ${{ matrix.version }}
strategy:
fail-fast: false
matrix:
ruby: ['3.3', '3.2', '3.1']
version: ['70', '71', 'main']

runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Setup project
working-directory: ./superglue_rails
run: |
mv Gemfile.${{ matrix.version }} Gemfile
bundle install
bundle update
- name: Run unit test
working-directory: ./superglue_rails
run: bundle exec rake test
- name: Run acceptance test
working-directory: ./superglue_rails
run: BUNDLE_GEMFILE='' ruby -Ilib:test test/acceptance/superglue_installation_acceptance.rb

13 changes: 9 additions & 4 deletions superglue_rails/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
source "https://rubygems.org"
source 'https://rubygems.org'
gemspec

gem "rails", "~> 7.0.0"
gem "props_template"
gem "standard"
gem 'rails', git: 'https://github.com/rails/rails', ref: 'main'
gem 'selenium-webdriver'
gem 'props_template'
gem 'standard'
gem 'capybara'
gem 'minitest'
gem 'rake'
gem 'sqlite3'
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ source 'https://rubygems.org'
gemspec

gem 'rails', '~> 7.1.0'
gem 'selenium-webdriver'
gem 'props_template'
gem 'standard'
gem 'capybara'
gem 'minitest'
gem 'rake'
gem 'sqlite3'
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ source 'https://rubygems.org'
gemspec

gem 'rails', '~> 7.0.0'
gem 'selenium-webdriver'
gem 'props_template'
gem 'standard'
gem 'capybara'
gem 'minitest'
gem 'rake'
gem 'sqlite3'
11 changes: 11 additions & 0 deletions superglue_rails/Gemfile.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://rubygems.org'
gemspec

gem 'rails', git: 'https://github.com/rails/rails', ref: 'main'
gem 'selenium-webdriver'
gem 'props_template'
gem 'standard'
gem 'capybara'
gem 'minitest'
gem 'rake'
gem 'sqlite3'
7 changes: 0 additions & 7 deletions superglue_rails/superglue.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,4 @@ Gem::Specification.new do |s|
s.add_dependency "actionpack", ">= 7.0.0"
s.add_dependency "props_template", ">= 0.32.0"
s.add_dependency "form_props", ">= 0.0.5"

s.add_development_dependency "activerecord", ">= 7.0"
s.add_development_dependency "rake", " ~> 12.0"
s.add_development_dependency "sqlite3", "~> 1.3"
s.add_development_dependency "minitest", "~> 5.10"
s.add_development_dependency "capybara", "~> 3.0"
s.add_development_dependency "selenium-webdriver", "~> 3.11"
end
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ def add_esbuild_cmd
successfully %(npm pkg set scripts.build="#{build_script}")
end

# def generate_test_app_6(app_name)
# successfully "rails new #{app_name} \
# --webpack \
# --skip-git \
# --skip-turbolinks \
# --skip-hotwire \
# --skip-spring \
# --no-rc"
# end

def generate_test_app_7(app_name)
successfully "rails new #{app_name} \
--javascript=esbuild \
Expand Down Expand Up @@ -164,7 +154,9 @@ def test_installation
click_button "Delete"
assert page.has_content?("Post was successfully destroyed.")
ensure
Process.kill "TERM", pid
Process.wait pid
if pid
Process.kill "TERM", pid
Process.wait pid
end
end
end
Loading