This is an automated email from the ASF dual-hosted git repository. glynnbird pushed a commit to branch detravisify in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git
commit c5cd2098ee2b563be43742b8e9a7fdb087716b5f Author: Glynn Bird <[email protected]> AuthorDate: Fri Jan 6 14:41:31 2023 +0000 first attempt at removing Travis and replacing with GitHub workflows --- .github/workflows/ci.yaml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ---------------- scripts/run_couchdb_on_travis.sh | 15 --------------- scripts/stop_couchdb_on_travis.sh | 7 ------- 4 files changed, 36 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..ab8d389 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,36 @@ +name: Nano Automated Testing + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + runs-on: ubuntu-latest + + services: + couchdb: + image: couchdb + ports: + - 5984:5984 + options: -n 1 + env: + COUCHDB_USER: admin + COUCHDB_PASSWORD: admin + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: TRAVIS=1 npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a92acf6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -dist: focal -language: "node_js" -node_js: - - "14" - - "16" - - "18" -services: - - docker -os: - - linux -before_script: - - ./scripts/run_couchdb_on_travis.sh -after_script: - - ./scripts/stop_couchdb_on_travis.sh -before_install: - - npm update -g npm diff --git a/scripts/run_couchdb_on_travis.sh b/scripts/run_couchdb_on_travis.sh deleted file mode 100755 index eeefa02..0000000 --- a/scripts/run_couchdb_on_travis.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -if [ ! -z $TRAVIS ]; then - # Install CouchDB Master - echo "Starting CouchDB 3 Docker" - docker run --ulimit nofile=2048:2048 -d -p 5984:5984 \ - --env COUCHDB_USER=admin --env COUCHDB_PASSWORD=admin \ - couchdb --with-haproxy -n 1 - - # wait for couchdb to start - while [ '200' != $(curl -s -o /dev/null -w %{http_code} http://admin:[email protected]:5984/_all_dbs) ]; do - echo waiting for couch to load... ; - sleep 1; - done -fi \ No newline at end of file diff --git a/scripts/stop_couchdb_on_travis.sh b/scripts/stop_couchdb_on_travis.sh deleted file mode 100755 index e1a9049..0000000 --- a/scripts/stop_couchdb_on_travis.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -if [ ! -z $TRAVIS ]; then - echo "Stopping CouchDB 3 Docker" - docker stop $(docker ps -a -q) - docker rm $(docker ps -a -q) -fi \ No newline at end of file
