Skip to content

Commit

Permalink
Adding test to ci (#1)
Browse files Browse the repository at this point in the history
- Running the same targets from the Phlex project against Ruby versions "3.2", "3.3", and "head".
- Removed an unused "require" from the Rakefile.
- ActiveSupport is a dependency in phlex_ui.rb, so I had to explicitly add it to the gemspec to make it work. Maybe in the future, we can remove this dependency.
  • Loading branch information
cirdes authored Jun 9, 2024
1 parent 6dcd426 commit 21ba307
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 24 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
pull_request:
branches:
- "*"
push:
branches:
- main

jobs:
standard:
name: StandardRB Check Action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec standardrb --format progress
tests:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
ruby-version:
- "3.2"
- "3.3"
- "head"
name: Running minitest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false

- run: bundle install
- run: bundle exec rake test
21 changes: 0 additions & 21 deletions .github/workflows/standardrb.yml

This file was deleted.

14 changes: 13 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PATH
remote: .
specs:
phlex_ui (0.1.9)
activesupport (~> 6.0)
phlex (~> 1.10)
rouge (~> 4.2.0)
ruby-next (~> 1.0)
Expand All @@ -10,8 +11,17 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.7.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
concurrent-ruby (1.3.3)
diff-lcs (1.5.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
Expand Down Expand Up @@ -67,6 +77,8 @@ GEM
standard-performance (1.3.1)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unparser (0.6.13)
diff-lcs (~> 1.3)
Expand All @@ -84,4 +96,4 @@ DEPENDENCIES
standard

BUNDLED WITH
2.5.3
2.3.25
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "standard/rake"
require "minitest/test_task"

Minitest::TestTask.create(:test) do |t|
Expand Down
1 change: 1 addition & 0 deletions phlex_ui.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Gem::Specification.new do |s|
s.add_dependency "phlex", "~> 1.10"
s.add_dependency "rouge", "~> 4.2.0"
s.add_dependency "zeitwerk", "~> 2.6"
s.add_dependency "activesupport", "~> 6.0"

# When gem is installed from source, we add `ruby-next` as a dependency
# to auto-transpile source files during the first load
Expand Down

0 comments on commit 21ba307

Please sign in to comment.