Skip to content

FEATURE: Disallow bots (UNFINISHED). #117

FEATURE: Disallow bots (UNFINISHED).

FEATURE: Disallow bots (UNFINISHED). #117

Workflow file for this run

name: Acceptance tests
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install and run Argos without proxy
run: |
wget https://github.com/Hypertopic/Argos/archive/v4.zip
unzip v4.zip
cd Argos-4
rm -rf __tests__
export COUCHDB_USER="TO_BE_CHANGED"
export COUCHDB_PASSWORD="TO_BE_CHANGED"
docker compose up -d install
- name: Wait for database service
uses: docker://benel/wait-for-response:1
with:
args: http://localhost:5984/argos 401 5000 500
- name: Enable public access
run: |
export COUCHDB_USER="TO_BE_CHANGED"
export COUCHDB_PASSWORD="TO_BE_CHANGED"
curl -X PUT -u "${COUCHDB_USER}:${COUCHDB_PASSWORD}" -s localhost:5984/argos/_security --data '{"members":{"roles":[]},"admins":{"roles":["_admin"]}}'
- name: Create test users
run: |
export COUCHDB_USER="TO_BE_CHANGED"
export COUCHDB_PASSWORD="TO_BE_CHANGED"
curl --silent -X PUT -u "${COUCHDB_USER}:${COUCHDB_PASSWORD}" localhost:5984/_users
curl --silent -X PUT -u "${COUCHDB_USER}:${COUCHDB_PASSWORD}" localhost:5984/_users/org.couchdb.user:alice -H 'Accept:application/json' -H 'Content-Type:application/json' -d '{"name":"alice", "password":"whiterabbit", "roles":[], "type":"user"}'
curl --silent -X PUT -u "${COUCHDB_USER}:${COUCHDB_PASSWORD}" localhost:5984/_users/org.couchdb.user:riemann -H 'Accept:application/json' -H 'Content-Type:application/json' -d '{"name":"riemann", "password":"secret", "roles":[], "type":"user"}'
- name: Install AAAforREST
run: npm install
- name: Run AAAforREST
run: npm start >/dev/null &
- name: Run https proxy
run: |
sudo snap install ngrok
ngrok http 1337 -bind-tls=true > /dev/null &
- name: Run tests
run: |
export APP_HOST=$(curl --silent http://127.0.0.1:4040/api/tunnels | jq -r '.tunnels[0].public_url')
npm test
shell: 'script -q -e -c "bash {0}"'