Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
Expand Down Expand Up @@ -109,6 +113,7 @@ jobs:
make \
openssl \
openssl-dev \
curl-dev \
readline-dev \
ruby \
tar \
Expand Down Expand Up @@ -367,7 +372,7 @@ jobs:

build_macos_x86_64:
needs: source
runs-on: macos-13
runs-on: macos-15-intel
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -406,7 +411,7 @@ jobs:
needs:
- source
- build_macos_x86_64
runs-on: macos-13
runs-on: macos-15-intel
steps:
- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -454,6 +459,10 @@ jobs:
- '3.3'
- '3.4'
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- uses: actions/download-artifact@v4
with:
name: couchbase-${{ needs.source.outputs.gem_version }}-x86_64-linux
Expand Down Expand Up @@ -555,6 +564,15 @@ jobs:
logs/*
test/**/*.{log,xml}
retention-days: 5
- name: Upload crash logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ github.run_attempt }}-${{ matrix.ruby }}-crash
path: |
~/Library/Logs/DiagnosticReports/
/Library/Logs/DiagnosticReports/
retention-days: 5
- name: Publish Test Report
uses: mikepenz/[email protected]
if: always()
Expand All @@ -569,7 +587,7 @@ jobs:
needs:
- source
- repackage_macos_x86_64
runs-on: macos-13
runs-on: macos-15-intel
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -616,6 +634,15 @@ jobs:
logs/*
test/**/*.{log,xml}
retention-days: 5
- name: Upload crash logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ github.run_attempt }}-${{ matrix.ruby }}-crash
path: |
~/Library/Logs/DiagnosticReports/
/Library/Logs/DiagnosticReports/
retention-days: 5
- name: Publish Test Report
uses: mikepenz/[email protected]
if: always()
Expand All @@ -640,6 +667,10 @@ jobs:
- 7.1.6
- 7.0.5
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Install cbdinocluster
run: |
mkdir -p "$HOME/bin"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/pkg/
/test/reports/
/tmp/
/logs/
/vendor/bundle/
Gemfile.lock
Makefile
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ gem "rake"

group :development do
gem "activesupport", "~> 7.0.3"
gem "curb"
gem "drb"
gem "faker"
gem "flay"
gem "flog"
gem "gem-compiler"
gem "grpc-tools", "~> 1.59"
gem "heckle"
gem "minitest"
gem "minitest", "< 6.0"
gem "minitest-reporters"
gem "mutex_m"
gem "rack"
Expand Down
21 changes: 12 additions & 9 deletions test/mock_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,33 @@
require "fileutils"
require "tmpdir"
require "socket"
require "curb"

class Caves
attr_accessor :verbose

VERSION = "v0.0.1-78"
VERSION = "v0.0.1-79"
FORK = "couchbaselabs"

def download_mock(url = caves_url)
return if binary_ready?

puts "download #{url}"
resp = Net::HTTP.get_response(URI.parse(url))

case resp
when Net::HTTPSuccess
raise "Unexpected content type: #{resp['content-type']}" if resp["content-type"] != "application/octet-stream"
curl = Curl::Easy.new(url) do |c|
c.follow_location = true
c.max_redirects = 5
end
curl.perform

case curl.response_code
when 200..299
raise "Unexpected content type: #{curl.content_type}" if curl.content_type != "application/octet-stream"
FileUtils.mkdir_p(caves_dir, verbose: verbose?)
File.write(mock_path, resp.body, binmode: true)
File.write(mock_path, curl.body, binmode: true)
FileUtils.chmod("a+x", mock_path, verbose: verbose?) unless windows?
when Net::HTTPRedirection
download_mock(resp["location"])
else
raise "Unable to download mock from #{url}: #{resp.status}"
raise "Unable to download mock from #{url}: #{curl.response_code}"
end
end

Expand Down
Loading