Skip to content

Commit 812f2dc

Browse files
committed
Modernize gem.
1 parent 600c1c4 commit 812f2dc

31 files changed

+492
-411
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ root = true
33
[*]
44
indent_style = tab
55
indent_size = 2
6+
7+
[*.{yml,yaml}]
8+
indent_style = space
9+
indent_size = 2
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Documentation Coverage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
10+
COVERAGE: PartialSummary
11+
12+
jobs:
13+
validate:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: "3.3"
21+
bundler-cache: true
22+
23+
- name: Validate coverage
24+
timeout-minutes: 5
25+
run: bundle exec bake decode:index:coverage lib

.github/workflows/documentation.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
CONSOLE_OUTPUT: XTerm
21+
BUNDLE_WITH: maintenance
22+
23+
jobs:
24+
generate:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: "3.3"
33+
bundler-cache: true
34+
35+
- name: Installing packages
36+
run: sudo apt-get install wget
37+
38+
- name: Generate documentation
39+
timeout-minutes: 5
40+
run: bundle exec bake utopia:project:static --force no
41+
42+
- name: Upload documentation artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs
46+
47+
deploy:
48+
runs-on: ubuntu-latest
49+
50+
environment:
51+
name: github-pages
52+
url: ${{steps.deployment.outputs.page_url}}
53+
54+
needs: generate
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

.github/workflows/documentation.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/rubocop.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: RuboCop
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
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+
- "3.1"
24+
- "3.2"
25+
- "3.3"
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ${{matrix.ruby}}
32+
bundler-cache: true
33+
34+
- name: Run RuboCop
35+
timeout-minutes: 10
36+
run: bundle exec rubocop

.github/workflows/test-coverage.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Test Coverage
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
10+
COVERAGE: PartialSummary
11+
12+
jobs:
13+
test:
14+
name: ${{matrix.ruby}} on ${{matrix.os}}
15+
runs-on: ${{matrix.os}}-latest
16+
17+
strategy:
18+
matrix:
19+
os:
20+
- ubuntu
21+
22+
ruby:
23+
- "3.3"
24+
25+
postgres:
26+
image: postgres
27+
ports:
28+
- 5432:5432
29+
env:
30+
POSTGRES_USER: test
31+
POSTGRES_PASSWORD: test
32+
POSTGRES_DB: test
33+
POSTGRES_HOST_AUTH_METHOD: trust
34+
options: >-
35+
--health-cmd pg_isready
36+
--health-interval 10s
37+
--health-timeout 5s
38+
--health-retries 20
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: ruby/setup-ruby@v1
43+
with:
44+
ruby-version: ${{matrix.ruby}}
45+
bundler-cache: true
46+
47+
- name: Installing dependencies (ubuntu)
48+
if: matrix.os == 'ubuntu'
49+
run: |
50+
sudo apt-get install postgresql postgresql-contrib
51+
52+
- name: Run tests
53+
timeout-minutes: 5
54+
run: bundle exec bake test
55+
56+
- uses: actions/upload-artifact@v3
57+
with:
58+
name: coverage-${{matrix.os}}-${{matrix.ruby}}
59+
path: .covered.db
60+
61+
validate:
62+
needs: test
63+
runs-on: ubuntu-latest
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
- uses: ruby/setup-ruby@v1
68+
with:
69+
ruby-version: "3.3"
70+
bundler-cache: true
71+
72+
- uses: actions/download-artifact@v3
73+
74+
- name: Validate coverage
75+
timeout-minutes: 5
76+
run: bundle exec bake covered:validate --paths */.covered.db \;

.github/workflows/test-external.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Test External
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
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+
21+
ruby:
22+
- "3.1"
23+
- "3.2"
24+
- "3.3"
25+
26+
postgres:
27+
image: postgres
28+
ports:
29+
- 5432:5432
30+
env:
31+
POSTGRES_USER: test
32+
POSTGRES_PASSWORD: test
33+
POSTGRES_DB: test
34+
POSTGRES_HOST_AUTH_METHOD: trust
35+
options: >-
36+
--health-cmd pg_isready
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 20
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: ruby/setup-ruby@v1
44+
with:
45+
ruby-version: ${{matrix.ruby}}
46+
bundler-cache: true
47+
48+
- name: Installing dependencies (ubuntu)
49+
if: matrix.os == 'ubuntu'
50+
run: |
51+
sudo apt-get install postgresql postgresql-contrib
52+
53+
- name: Run tests
54+
timeout-minutes: 10
55+
run: bundle exec bake test:external
Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
name: Development
1+
name: Test
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
8+
env:
9+
CONSOLE_OUTPUT: XTerm
10+
511
jobs:
612
test:
713
name: ${{matrix.ruby}} on ${{matrix.os}}
@@ -14,12 +20,11 @@ jobs:
1420
- ubuntu
1521

1622
ruby:
17-
- "2.6"
18-
- "2.7"
19-
- "3.0"
23+
- "3.1"
24+
- "3.2"
25+
- "3.3"
2026

2127
experimental: [false]
22-
env: [""]
2328

2429
include:
2530
- os: ubuntu
@@ -28,29 +33,27 @@ jobs:
2833
- os: ubuntu
2934
ruby: jruby
3035
experimental: true
31-
env: JRUBY_OPTS="--debug -X+O"
3236
- os: ubuntu
3337
ruby: head
3438
experimental: true
3539

36-
services:
37-
postgres:
38-
image: postgres
39-
ports:
40-
- 5432:5432
41-
env:
42-
POSTGRES_USER: test
43-
POSTGRES_PASSWORD: test
44-
POSTGRES_DB: test
45-
POSTGRES_HOST_AUTH_METHOD: trust
46-
options: >-
47-
--health-cmd pg_isready
48-
--health-interval 10s
49-
--health-timeout 5s
50-
--health-retries 20
40+
postgres:
41+
image: postgres
42+
ports:
43+
- 5432:5432
44+
env:
45+
POSTGRES_USER: test
46+
POSTGRES_PASSWORD: test
47+
POSTGRES_DB: test
48+
POSTGRES_HOST_AUTH_METHOD: trust
49+
options: >-
50+
--health-cmd pg_isready
51+
--health-interval 10s
52+
--health-timeout 5s
53+
--health-retries 20
5154
5255
steps:
53-
- uses: actions/checkout@v2
56+
- uses: actions/checkout@v4
5457
- uses: ruby/setup-ruby@v1
5558
with:
5659
ruby-version: ${{matrix.ruby}}
@@ -62,5 +65,5 @@ jobs:
6265
sudo apt-get install postgresql postgresql-contrib
6366
6467
- name: Run tests
65-
timeout-minutes: 5
66-
run: ${{matrix.env}} bundle exec rspec
68+
timeout-minutes: 10
69+
run: bundle exec bake test

.gitignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/.bundle/
2-
/doc/
32
/pkg/
4-
/tmp/
5-
6-
# rspec failure tracking
7-
.rspec_status
8-
gems.locked
3+
/gems.locked
4+
/.covered.db
5+
/external

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Aidan Samuel <[email protected]>

.rspec

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)