Skip to content

Commit

Permalink
More independence within examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlyobvious committed Oct 23, 2023
1 parent 3e20905 commit 2bd836f
Show file tree
Hide file tree
Showing 49 changed files with 269 additions and 36 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/actor_like.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_actor_like
- run: make test
working-directory: actor_like
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_actor_like
- run: make mutate
working-directory: actor_like
6 changes: 4 additions & 2 deletions .github/workflows/aggregate_root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_aggregate_root
- run: make test
working-directory: aggregate_root
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_aggregate_root
- run: make mutate
working-directory: aggregate_root
6 changes: 4 additions & 2 deletions .github/workflows/duck_typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_duck_typing
- run: make test
working-directory: duck_typing
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_duck_typing
- run: make mutate
working-directory: duck_typing
6 changes: 4 additions & 2 deletions .github/workflows/extracted_state.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_extracted_state
- run: make test
working-directory: extracted_state
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_extracted_state
- run: make mutate
working-directory: extracted_state
6 changes: 4 additions & 2 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_functional
- run: make test
working-directory: functional
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_functional
- run: make mutate
working-directory: functional
6 changes: 4 additions & 2 deletions .github/workflows/polymorphic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_polymorphic
- run: make test
working-directory: polymorphic
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_polymorphic
- run: make mutate
working-directory: polymorphic
6 changes: 4 additions & 2 deletions .github/workflows/poro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_poro
- run: make test
working-directory: poro
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_poro
- run: make mutate
working-directory: poro
6 changes: 4 additions & 2 deletions .github/workflows/query_based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_query_based
- run: make test
working-directory: query_based
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_query_based
- run: make mutate
working-directory: query_based
6 changes: 4 additions & 2 deletions .github/workflows/rails_way.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_rails_way
- run: make test
working-directory: rails_way
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_rails_way
- run: make mutate
working-directory: rails_way
6 changes: 4 additions & 2 deletions .github/workflows/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_repository
- run: make test
working-directory: repository
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_repository
- run: make mutate
working-directory: repository
6 changes: 4 additions & 2 deletions .github/workflows/roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_roles
- run: make test
working-directory: roles
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_roles
- run: make mutate
working-directory: roles
6 changes: 4 additions & 2 deletions .github/workflows/yield_based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make test_yield_based
- run: make test
working-directory: yield_based
mutate:
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -28,4 +29,5 @@ jobs:
with:
ruby-version: 3.2.2
bundler-cache: true
- run: make mutate_yield_based
- run: make mutate
working-directory: yield_based
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,10 @@ EXAMPLES = actor_like \
yield_based

$(addprefix test_, $(EXAMPLES)):
@bundle exec ruby \
-I$(subst test_,,$@)/lib \
-rproject_management \
test/issue_test.rb
@make -C $(subst test_,,$@) test

$(addprefix mutate_, $(EXAMPLES)):
@bundle exec mutant run \
--include $(subst mutate_,,$@)/lib

mutate_extracted_state:
@bundle exec mutant run --include test \
--include extracted_state/lib \
--ignore-subject "ProjectManagement::Issue#apply_on_state" \
--ignore-subject "ProjectManagement::Issue#apply"
@make -C $(subst mutate_,,$@) mutate

show_ui:
@bundle exec ruby ui/duck_typing_ui.rb
Expand Down
9 changes: 9 additions & 0 deletions actor_like/.mutant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
integration:
name: minitest
includes:
- lib
requires:
- project_management
matcher:
subjects:
- ProjectManagement*
7 changes: 7 additions & 0 deletions actor_like/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:
@bundle exec ruby -Ilib -rproject_management test/issue_test.rb

mutate:
@bundle exec mutant run

.PHONY: test mutate
2 changes: 2 additions & 0 deletions actor_like/test/issue_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require_relative "../lib/project_management"
require_relative "../../test/issue_test"
9 changes: 9 additions & 0 deletions aggregate_root/.mutant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
integration:
name: minitest
includes:
- lib
requires:
- project_management
matcher:
subjects:
- ProjectManagement*
7 changes: 7 additions & 0 deletions aggregate_root/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:
@bundle exec ruby -Ilib -rproject_management test/issue_test.rb

mutate:
@bundle exec mutant run

.PHONY: test mutate
2 changes: 2 additions & 0 deletions aggregate_root/test/issue_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require_relative "../lib/project_management"
require_relative "../../test/issue_test"
9 changes: 9 additions & 0 deletions duck_typing/.mutant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
integration:
name: minitest
includes:
- lib
requires:
- project_management
matcher:
subjects:
- ProjectManagement*
7 changes: 7 additions & 0 deletions duck_typing/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:
@bundle exec ruby -Ilib -rproject_management test/issue_test.rb

mutate:
@bundle exec mutant run

.PHONY: test mutate
2 changes: 2 additions & 0 deletions duck_typing/test/issue_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require_relative "../lib/project_management"
require_relative "../../test/issue_test"
12 changes: 12 additions & 0 deletions extracted_state/.mutant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
integration:
name: minitest
includes:
- lib
requires:
- project_management
matcher:
subjects:
- ProjectManagement*
ignore:
- ProjectManagement::Issue#apply_on_state
- ProjectManagement::Issue#apply
7 changes: 7 additions & 0 deletions extracted_state/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:
@bundle exec ruby -Ilib -rproject_management test/issue_test.rb

mutate:
@bundle exec mutant run

.PHONY: test mutate
2 changes: 2 additions & 0 deletions extracted_state/test/issue_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require_relative "../lib/project_management"
require_relative "../../test/issue_test"
9 changes: 9 additions & 0 deletions functional/.mutant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
integration:
name: minitest
includes:
- lib
requires:
- project_management
matcher:
subjects:
- ProjectManagement*
7 changes: 7 additions & 0 deletions functional/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:
@bundle exec ruby -Ilib -rproject_management test/issue_test.rb

mutate:
@bundle exec mutant run

.PHONY: test mutate
2 changes: 2 additions & 0 deletions functional/test/issue_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require_relative "../lib/project_management"
require_relative "../../test/issue_test"
9 changes: 9 additions & 0 deletions polymorphic/.mutant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
integration:
name: minitest
includes:
- lib
requires:
- project_management
matcher:
subjects:
- ProjectManagement*
7 changes: 7 additions & 0 deletions polymorphic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:
@bundle exec ruby -Ilib -rproject_management test/issue_test.rb

mutate:
@bundle exec mutant run

.PHONY: test mutate
2 changes: 2 additions & 0 deletions polymorphic/test/issue_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require_relative "../lib/project_management"
require_relative "../../test/issue_test"
9 changes: 9 additions & 0 deletions poro/.mutant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
integration:
name: minitest
includes:
- lib
requires:
- project_management
matcher:
subjects:
- ProjectManagement*
Loading

0 comments on commit 2bd836f

Please sign in to comment.