Skip to content

Commit f736d3b

Browse files
committed
Modernize gem and move tests to sus.
1 parent 70d7972 commit f736d3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+834
-1066
lines changed

.github/workflows/async-head.yml .github/workflows/async-head.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626

2727
- name: Run tests
2828
timeout-minutes: 5
29-
run: bundle exec rspec
29+
run: bundle exec sus

.github/workflows/async-v1.yml .github/workflows/async-v1.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626

2727
- name: Run tests
2828
timeout-minutes: 5
29-
run: bundle exec rspec
29+
run: bundle exec sus

.github/workflows/coverage.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 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+
- macos
22+
23+
ruby:
24+
- "3.1"
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{matrix.ruby}}
31+
bundler-cache: true
32+
33+
- name: Run tests
34+
timeout-minutes: 5
35+
run: bundle exec bake test
36+
37+
- uses: actions/upload-artifact@v2
38+
with:
39+
name: coverage-${{matrix.os}}-${{matrix.ruby}}
40+
path: .covered.db
41+
42+
validate:
43+
needs: test
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: ruby/setup-ruby@v1
49+
with:
50+
ruby-version: "3.1"
51+
bundler-cache: true
52+
53+
- uses: actions/download-artifact@v3
54+
55+
- name: Validate coverage
56+
timeout-minutes: 5
57+
run: bundle exec bake covered:validate --paths */.covered.db \;

.github/workflows/documentation.yaml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Allows you to run this workflow manually from the Actions tab:
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment:
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
21+
22+
env:
23+
CONSOLE_OUTPUT: XTerm
24+
BUNDLE_WITH: maintenance
25+
26+
jobs:
27+
generate:
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- uses: actions/checkout@v3
32+
33+
- uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: "3.1"
36+
bundler-cache: true
37+
38+
- name: Installing packages
39+
run: sudo apt-get install wget
40+
41+
- name: Generate documentation
42+
timeout-minutes: 5
43+
run: bundle exec bake utopia:project:static --force no
44+
45+
- name: Upload documentation artifact
46+
uses: actions/upload-pages-artifact@v1
47+
with:
48+
path: docs
49+
50+
deploy:
51+
runs-on: ubuntu-latest
52+
53+
environment:
54+
name: github-pages
55+
url: ${{steps.deployment.outputs.page_url}}
56+
57+
needs: generate
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v1

.github/workflows/documentation.yml

-32
This file was deleted.

.github/workflows/test-external.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
- macos
21+
22+
ruby:
23+
- "2.7"
24+
- "3.0"
25+
- "3.1"
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ${{matrix.ruby}}
32+
bundler-cache: true
33+
34+
- name: Run tests
35+
timeout-minutes: 10
36+
run: bundle exec bake test:external
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
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:
13+
name: ${{matrix.ruby}} on ${{matrix.os}}
714
runs-on: ${{matrix.os}}-latest
815
continue-on-error: ${{matrix.experimental}}
916

@@ -14,13 +21,11 @@ jobs:
1421
- macos
1522

1623
ruby:
17-
- 2.5
18-
- 2.6
19-
- 2.7
20-
- 3.0
24+
- "2.7"
25+
- "3.0"
26+
- "3.1"
2127

2228
experimental: [false]
23-
env: [""]
2429

2530
include:
2631
- os: ubuntu
@@ -34,12 +39,12 @@ jobs:
3439
experimental: true
3540

3641
steps:
37-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v3
3843
- uses: ruby/setup-ruby@v1
3944
with:
4045
ruby-version: ${{matrix.ruby}}
4146
bundler-cache: true
4247

4348
- name: Run tests
44-
timeout-minutes: 5
45-
run: ${{matrix.env}} bundle exec rspec
49+
timeout-minutes: 10
50+
run: bundle exec bake test

.gitignore

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
/.bundle/
2-
/.yardoc
3-
/_yardoc/
4-
/coverage/
5-
/doc/
62
/pkg/
7-
/spec/reports/
8-
/tmp/
9-
10-
# rspec failure tracking
11-
.rspec_status
12-
gems.locked
3+
/gems.locked
4+
/.covered.db
5+
/external

.mailmap

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Yuji Yaginuma <[email protected]>
2+
Juan Antonio Martín Lucas <[email protected]>

.rspec

-3
This file was deleted.

.yardopts

-1
This file was deleted.

README.md

-49
This file was deleted.

async-container.gemspec

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12

23
require_relative "lib/async/container/version"
34

@@ -6,20 +7,23 @@ Gem::Specification.new do |spec|
67
spec.version = Async::Container::VERSION
78

89
spec.summary = "Abstract container-based parallelism using threads and processes where appropriate."
9-
spec.authors = ["Samuel Williams"]
10+
spec.authors = ["Samuel Williams", "Olle Jonsson", "Anton Sozontov", "Juan Antonio Martín Lucas", "Yuji Yaginuma"]
1011
spec.license = "MIT"
1112

13+
spec.cert_chain = ['release.cert']
14+
spec.signing_key = File.expand_path('~/.gem/release.pem')
15+
1216
spec.homepage = "https://github.com/socketry/async-container"
1317

14-
spec.files = Dir.glob('{lib}/**/*', File::FNM_DOTMATCH, base: __dir__)
18+
spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)
1519

1620
spec.required_ruby_version = ">= 2.5"
1721

1822
spec.add_dependency "async"
1923
spec.add_dependency "async-io"
2024

21-
spec.add_development_dependency "async-rspec", "~> 1.1"
25+
spec.add_development_dependency "bake-test"
2226
spec.add_development_dependency "bundler"
2327
spec.add_development_dependency "covered"
24-
spec.add_development_dependency "rspec", "~> 3.6"
28+
spec.add_development_dependency "sus"
2529
end

config/external.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
falcon:
2+
url: https://github.com/socketry/falcon.git
3+
command: bundle exec rspec

config/sus.rb

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2022, by Samuel Williams.
5+
6+
require 'covered/sus'
7+
include Covered::Sus
8+
9+
ENV['CONSOLE_LEVEL'] ||= 'fatal'

examples/async.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# frozen_string_literal: true
22

3+
# Released under the MIT License.
4+
# Copyright, 2020-2022, by Samuel Williams.
5+
36
require 'kernel/sync'
47

58
class Worker

examples/channel.rb

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# frozen_string_literal: true
22

3+
# Released under the MIT License.
4+
# Copyright, 2020-2022, by Samuel Williams.
5+
# Copyright, 2020, by Olle Jonsson.
6+
37
require 'json'
48

59
class Channel

0 commit comments

Comments
 (0)