Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test load csv #210

Draft
wants to merge 16 commits into
base: 4.4
Choose a base branch
from
32 changes: 18 additions & 14 deletions .github/workflows/specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,24 @@ jobs:
fail-fast: false
matrix:
ruby: [ jruby, ruby ]
neo4j: [ 3.5.35, 4.0.12, 4.1.12, 4.2.19, 4.3.19, 4.4.12 ]
neo4j: [ 3.5.35, 4.0.12, 4.1.12, 4.2.19, 4.3.19, 4.4.12, 5.1.0 ]
include:
- neo4j: 5.1.0
ruby: ruby
java-version: 17
- neo4j: 5.1.0
ruby: jruby
options: "-t ~causal"
env:
NEO4J_EDITION_FLAG: -e
NEO4J_VERSION: ${{ matrix.neo4j }}
steps:
- uses: actions/checkout@v2
- run: echo $PWD
- run: mkdir -p $PWD/tmp
- run: chmod a+wr $PWD/tmp
- name: Start neo4j
run: docker run --name neo4j --env NEO4J_AUTH=neo4j/pass --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes -p7687:7687 --volume=$PWD/tmp:/var/lib/neo4j/inmport --rm neo4j:${{ matrix.neo4j }}-enterprise &

- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -39,20 +51,12 @@ jobs:
packages: git+https://github.com/klobuczek/[email protected]#egg=boltkit

- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version || 11 }}

- name: Setup Neo4j
run: |
neoctrl-install $NEO4J_EDITION_FLAG $NEO4J_VERSION servers
if [ -n "$NEO4J_EDITION_FLAG" ]; then NEO4J_EDITION=enterprise; else NEO4J_EDITION=community; fi
NEO4J_DIR=servers/neo4j-$NEO4J_EDITION-$NEO4J_VERSION
neoctrl-configure $NEO4J_DIR dbms.memory.pagecache.size=600m dbms.memory.heap.max_size=600m dbms.memory.heap.initial_size=600m dbms.directories.import= dbms.connectors.default_listen_address=::
neoctrl-set-initial-password pass $NEO4J_DIR
neoctrl-start $NEO4J_DIR

- name: Install dependencies
run: bin/setup
- name: Run tests
run: bundle exec rspec
run: bundle exec rspec ${{ matrix.options }}
Empty file modified spec/integration/async/async_session_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/bookmark_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/causal_clustering_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/direct_driver_spec.rb
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions spec/integration/load_csv_spec.rb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

RSpec.describe 'LoadCsv', csv: true do
let(:iris_class_names) { %w[Iris-setosa Iris-versicolor Iris-virginica] }
let(:file) { Tempfile.new(%w[file .csv]) }
let(:file) { Tempfile.new('', 'tmp') }
let(:file_path) { file.path }
let(:iris_data) do
%w[sepal_length,sepal_width,petal_length,petal_width,class_name
Expand Down Expand Up @@ -189,7 +189,8 @@
else
"#{load} CALL { WITH l #{subquery} } IN TRANSACTIONS OF #{size} ROWS #{return_s}"
end
result = session.run(query, csv_file_url: "file://#{file_path}")
result = session.run(query, csv_file_url: "file:///#{File.basename(file)}")

expect(result.next[:c]).to eq(150)
expect(result.has_next?).to be_falsey
end
Expand Down
Empty file modified spec/integration/logging_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/parameters_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/result_stream_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/scalar_types_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/session_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/summary_spec.rb
100644 → 100755
Empty file.
Empty file modified spec/integration/transaction_spec.rb
100644 → 100755
Empty file.