forked from cobot/couchdb-action
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.1 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
couchdb: ["3.3", "3.2", "3.1", "2.3"]
steps:
- uses: actions/checkout@v4
- name: Set up CouchDB
uses: ./
with:
couchdb version: ${{ matrix.couchdb }}
env:
NODENAME: localhost
ERL_NATOVE_QUERY: true
COUCHDB_USER: admin
COUCHDB_PASSWORD: password
- name: Test that CouchDB can be accessed
run: curl -sS -f http://admin:password@localhost:5984/
- name: Test that system databases are there
run: curl -sS -f http://admin:password@localhost:5984/_users
- name: Test that the Erlang query server is enabled
run: |
curl -sS -f 'http://admin:password@localhost:5984/_users/_design/test' -X PUT -H 'Content-Type: application/json' --data '{"views":{"test":{"map":"fun({Doc}) -> Emit(proplists:get_value(<<\"name\">>, Doc, null), 1) end."}},"language":"erlang"}'
curl -sS -f 'http://admin:password@localhost:5984/_users/_design/test/_view/test' -v