forked from acaprojects/couchbase-orm
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from CedricCouton/github-actions
GitHub actions
- Loading branch information
Showing
4 changed files
with
55 additions
and
2 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,39 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
gemfile: [ '7.0.0', '5.1.7' ] | ||
ruby: [ '3.0', '2.7', '2.6'] | ||
exclude: | ||
- ruby: '3.0' | ||
gemfile: '5.1.7' | ||
- ruby: '2.7' | ||
gemfile: '5.1.7' | ||
- ruby: '2.6' | ||
gemfile: '7.0.0' | ||
fail-fast: false | ||
runs-on: ubuntu-18.04 | ||
name: ${{ matrix.ruby }} ${{ matrix.database }} rails-${{ matrix.gemfile }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sudo apt-get update && sudo apt-get install libevent-dev | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- run: sudo ./ci/run_couchbase.sh | ||
- run: bundle exec rspec | ||
env: | ||
ACTIVE_MODEL_VERSION: ${{ matrix.gemfile }} | ||
BUNDLE_JOBS: 4 | ||
BUNDLE_PATH: vendor/bundle | ||
TRAVIS_TEST: true | ||
RAILS_ENV: test |
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,14 @@ | ||
set -x | ||
set -e | ||
apt-get install libev-dev python-httplib2 libssl1.0.0 | ||
wget https://packages.couchbase.com/releases/5.1.0/couchbase-server-enterprise_5.1.0-ubuntu14.04_amd64.deb | ||
dpkg -i couchbase-server-enterprise_5.1.0-ubuntu14.04_amd64.deb | ||
sleep 8 | ||
sudo service couchbase-server status | ||
/opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:8091 --cluster-username=admin --cluster-password=password --cluster-ramsize=320 --cluster-index-ramsize=256 --cluster-fts-ramsize=256 --services=data,index,query,fts | ||
sleep 5 | ||
/opt/couchbase/bin/couchbase-cli server-info -c 127.0.0.1:8091 -u admin -p password | ||
/opt/couchbase/bin/couchbase-cli bucket-create -c 127.0.0.1:8091 -u admin -p password --bucket=default --bucket-type=couchbase --bucket-ramsize=160 --bucket-replica=0 --wait | ||
sleep 1 | ||
/opt/couchbase/bin/couchbase-cli user-manage -c 127.0.0.1:8091 -u admin -p password --set --rbac-username tester --rbac-password password123 --rbac-name "Auto Tester" --roles admin --auth-domain local | ||
curl http://admin:password@localhost:8093/query/service -d 'statement=CREATE INDEX `default_type` ON `default`(`type`)' |
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