Skip to content

Commit 3a2ab0f

Browse files
Working on tests.
1 parent e17a365 commit 3a2ab0f

36 files changed

+1660
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 2
6+
7+
[*.{yml,yaml}]
8+
indent_style = space
9+
indent_size = 2
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Documentation Coverage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
COVERAGE: PartialSummary
10+
11+
jobs:
12+
validate:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: ruby
20+
bundler-cache: true
21+
22+
- name: Validate coverage
23+
timeout-minutes: 5
24+
run: bundle exec bake decode:index:coverage lib
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow one concurrent deployment:
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
env:
20+
BUNDLE_WITH: maintenance
21+
22+
jobs:
23+
generate:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ruby
32+
bundler-cache: true
33+
34+
- name: Installing packages
35+
run: sudo apt-get install wget
36+
37+
- name: Generate documentation
38+
timeout-minutes: 5
39+
run: bundle exec bake utopia:project:static --force no
40+
41+
- name: Upload documentation artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: docs
45+
46+
deploy:
47+
runs-on: ubuntu-latest
48+
49+
environment:
50+
name: github-pages
51+
url: ${{steps.deployment.outputs.page_url}}
52+
53+
needs: generate
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.github/workflows/rubocop.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: RuboCop
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: ruby
17+
bundler-cache: true
18+
19+
- name: Run RuboCop
20+
timeout-minutes: 10
21+
run: bundle exec rubocop
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Test Coverage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
COVERAGE: PartialSummary
10+
11+
jobs:
12+
test:
13+
name: ${{matrix.ruby}} on ${{matrix.os}}
14+
runs-on: ${{matrix.os}}-latest
15+
16+
strategy:
17+
matrix:
18+
os:
19+
- ubuntu
20+
- macos
21+
22+
ruby:
23+
- ruby
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: ${{matrix.ruby}}
30+
bundler-cache: true
31+
32+
- name: Run tests
33+
timeout-minutes: 5
34+
run: bundle exec bake test
35+
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
include-hidden-files: true
39+
if-no-files-found: error
40+
name: coverage-${{matrix.os}}-${{matrix.ruby}}
41+
path: .covered.db
42+
43+
validate:
44+
needs: test
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: ruby/setup-ruby@v1
50+
with:
51+
ruby-version: ruby
52+
bundler-cache: true
53+
54+
- uses: actions/download-artifact@v4
55+
56+
- name: Validate coverage
57+
timeout-minutes: 5
58+
run: bundle exec bake covered:validate --paths */.covered.db \;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test External
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
name: ${{matrix.ruby}} on ${{matrix.os}}
11+
runs-on: ${{matrix.os}}-latest
12+
13+
strategy:
14+
matrix:
15+
os:
16+
- ubuntu
17+
- macos
18+
19+
ruby:
20+
- "3.2"
21+
- "3.3"
22+
- "3.4"
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: ${{matrix.ruby}}
29+
bundler-cache: true
30+
31+
- name: Run tests
32+
timeout-minutes: 10
33+
run: bundle exec bake test:external

.github/workflows/test.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
name: ${{matrix.ruby}} on ${{matrix.os}}
11+
runs-on: ${{matrix.os}}-latest
12+
continue-on-error: ${{matrix.experimental}}
13+
14+
strategy:
15+
matrix:
16+
os:
17+
- ubuntu
18+
- macos
19+
20+
ruby:
21+
- "3.2"
22+
- "3.3"
23+
- "3.4"
24+
25+
experimental: [false]
26+
27+
include:
28+
- os: ubuntu
29+
ruby: truffleruby
30+
experimental: true
31+
- os: ubuntu
32+
ruby: jruby
33+
experimental: true
34+
- os: ubuntu
35+
ruby: head
36+
experimental: true
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: ruby/setup-ruby@v1
41+
with:
42+
ruby-version: ${{matrix.ruby}}
43+
bundler-cache: true
44+
45+
- name: Run tests
46+
timeout-minutes: 10
47+
run: bundle exec bake test

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/agents.md
2+
/.context
3+
/.bundle
4+
/pkg
5+
/gems.locked
6+
/.covered.db
7+
/external
8+
9+
# YARD artifacts
10+
.yardoc
11+
_yardoc
12+
doc/
13+
14+
# Bundler
15+
vendor/bundle
16+
17+
# Test artifacts
18+
.covered.db
19+
20+
# IDE
21+
.vscode/
22+
.idea/

.rubocop.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
plugins:
2+
- rubocop-md
3+
- rubocop-socketry
4+
5+
AllCops:
6+
DisabledByDefault: true
7+
8+
# Socketry specific rules:
9+
10+
Layout/ConsistentBlankLineIndentation:
11+
Enabled: true
12+
13+
Layout/BlockDelimiterSpacing:
14+
Enabled: true
15+
16+
# General Layout rules:
17+
18+
Layout/IndentationStyle:
19+
Enabled: true
20+
EnforcedStyle: tabs
21+
22+
Layout/InitialIndentation:
23+
Enabled: true
24+
25+
Layout/IndentationWidth:
26+
Enabled: true
27+
Width: 1
28+
29+
Layout/IndentationConsistency:
30+
Enabled: true
31+
EnforcedStyle: normal
32+
33+
Layout/BlockAlignment:
34+
Enabled: true
35+
36+
Layout/EndAlignment:
37+
Enabled: true
38+
EnforcedStyleAlignWith: start_of_line
39+
40+
Layout/BeginEndAlignment:
41+
Enabled: true
42+
EnforcedStyleAlignWith: start_of_line
43+
44+
Layout/RescueEnsureAlignment:
45+
Enabled: true
46+
47+
Layout/ElseAlignment:
48+
Enabled: true
49+
50+
Layout/DefEndAlignment:
51+
Enabled: true
52+
53+
Layout/CaseIndentation:
54+
Enabled: true
55+
EnforcedStyle: end
56+
57+
Layout/CommentIndentation:
58+
Enabled: true
59+
60+
Layout/FirstHashElementIndentation:
61+
Enabled: true
62+
EnforcedStyle: consistent
63+
64+
Layout/EmptyLinesAroundClassBody:
65+
Enabled: true
66+
67+
Layout/EmptyLinesAroundModuleBody:
68+
Enabled: true
69+
70+
Layout/EmptyLineAfterMagicComment:
71+
Enabled: true
72+
73+
Layout/SpaceInsideBlockBraces:
74+
Enabled: true
75+
EnforcedStyle: no_space
76+
SpaceBeforeBlockParameters: false
77+
78+
Layout/SpaceAroundBlockParameters:
79+
Enabled: true
80+
EnforcedStyleInsidePipes: no_space
81+
82+
Style/FrozenStringLiteralComment:
83+
Enabled: true
84+
85+
Style/StringLiterals:
86+
Enabled: true
87+
EnforcedStyle: double_quotes

0 commit comments

Comments
 (0)