Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
203 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
repo_token: T4Cj59vkwBh79F3pGpO8GAJ9pdMACx9b9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This workflow runs continuous CI across different versions of ruby on all branches and pull requests to develop. | ||
|
||
name: CI | ||
on: | ||
push: | ||
branches: [ '**' ] | ||
pull_request: | ||
branches: [ develop ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
name: Ruby ${{ matrix.ruby }} | ||
if: "contains(github.event.commits[0].message, '[ci skip]') == false" | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- 2.4 | ||
- 2.5 | ||
- 2.6 | ||
- 2.7 | ||
- 3.0 | ||
- ruby-head | ||
- jruby | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
- name: Install dependencies | ||
run: bundle install --jobs 4 --retry 3 | ||
- name: Run tests | ||
run: bundle exec rspec spec | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.1.1 | ||
3.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
$:.unshift "." | ||
require 'spec_helper' | ||
|
||
describe RDF::TriG::Reader do | ||
# W3C Turtle Test suite from http://w3c.github.io/rdf-tests/turtle/manifest.ttl | ||
describe "rdfstar turtle tests" do | ||
require 'suite_helper' | ||
|
||
%w(turtle/syntax turtle/eval).each do |man| | ||
Fixtures::SuiteTest::Manifest.open("https://w3c.github.io/rdf-star/tests/#{man}/manifest.ttl") do |m| | ||
describe [m.label, m.comment].compact.join(': ') do | ||
m.entries.each do |t| | ||
specify "#{t.name}: #{t.comment}" do | ||
t.logger = RDF::Spec.logger | ||
t.logger.info t.inspect | ||
t.logger.info "source:\n#{t.input}" | ||
|
||
reader = RDF::TriG::Reader.new(t.input, | ||
base_uri: t.base, | ||
canonicalize: false, | ||
validate: true, | ||
rdfstar: true, | ||
logger: t.logger) | ||
|
||
graph = RDF::Repository.new | ||
|
||
if t.positive_test? | ||
begin | ||
graph << reader | ||
rescue Exception => e | ||
expect(e.message).to produce("Not exception #{e.inspect}", t) | ||
end | ||
|
||
if t.evaluate? | ||
output_graph = RDF::Repository.load(t.result, format: :ntriples, rdfstar: true, base_uri: t.base) | ||
expect(graph).to be_equivalent_graph(output_graph, t) | ||
else | ||
expect(graph).to be_a(RDF::Enumerable) | ||
end | ||
else | ||
expect { | ||
graph << reader | ||
expect(graph.dump(:ntriples)).to produce("not this", t) | ||
}.to raise_error(RDF::ReaderError) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end unless ENV['CI'] |
Oops, something went wrong.