Skip to content

Create node.js.yml #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5fd1856
Create node.js.yml
TrivediHeena Jan 4, 2023
d514da7
Update node.js.yml
TrivediHeena Jan 5, 2023
37f0857
Update node.js.yml
TrivediHeena Jan 5, 2023
efc265f
Update node.js.yml
TrivediHeena Jan 5, 2023
8bc2c1c
Update node.js.yml
TrivediHeena Jan 5, 2023
3249288
Update node.js.yml
TrivediHeena Jan 5, 2023
2799197
Update node.js.yml
TrivediHeena Jan 5, 2023
0e0410d
Update node.js.yml
TrivediHeena Jan 6, 2023
4d7e856
Update node.js.yml
TrivediHeena Jan 6, 2023
1cbde38
Update node.js.yml
TrivediHeena Jan 7, 2023
a7ed326
Update node.js.yml
TrivediHeena Jan 7, 2023
3acca93
Update node.js.yml
TrivediHeena Jan 7, 2023
3d92fb3
Update node.js.yml
TrivediHeena Jan 7, 2023
89fe74b
Update node.js.yml
TrivediHeena Jan 7, 2023
e5fcd42
Update node.js.yml
TrivediHeena Jan 7, 2023
dbcd72b
Update node.js.yml
TrivediHeena Jan 7, 2023
b96ac01
Update node.js.yml
TrivediHeena Jan 7, 2023
34d1881
Update node.js.yml
TrivediHeena Jan 7, 2023
cca129f
Update node.js.yml
TrivediHeena Jan 7, 2023
d7e4818
Update node.js.yml
TrivediHeena Jan 7, 2023
57e1ce7
Update node.js.yml
TrivediHeena Jan 7, 2023
0ccad24
Update node.js.yml
TrivediHeena Jan 7, 2023
b12a954
Update node.js.yml
TrivediHeena Jan 7, 2023
eb92563
Update node.js.yml
TrivediHeena Jan 7, 2023
3767393
Update node.js.yml
TrivediHeena Jan 8, 2023
f9ab9ef
Update node.js.yml
TrivediHeena Jan 8, 2023
1b8dfcb
Update node.js.yml
TrivediHeena Jan 8, 2023
dc92a16
Update node.js.yml
TrivediHeena Jan 8, 2023
2b1a059
Update node.js.yml
TrivediHeena Jan 8, 2023
4daf770
Update node.js.yml
TrivediHeena Jan 8, 2023
dece1e8
Update node.js.yml
TrivediHeena Jan 8, 2023
a99e0c4
Update node.js.yml
TrivediHeena Jan 8, 2023
67d0ff2
Update node.js.yml
TrivediHeena Jan 8, 2023
f08c5b2
Update node.js.yml
TrivediHeena Jan 8, 2023
1dac68e
Update node.js.yml
TrivediHeena Jan 8, 2023
b30d2de
Update node.js.yml
TrivediHeena Jan 8, 2023
2be65f4
Update node.js.yml
TrivediHeena Jan 8, 2023
0b198d9
Update node.js.yml
TrivediHeena Jan 8, 2023
7cc36ef
Update node.js.yml
TrivediHeena Jan 9, 2023
aaf4327
Update node.js.yml
TrivediHeena Jan 9, 2023
e2d12b0
Update node.js.yml
TrivediHeena Jan 9, 2023
20a4a47
Update node.js.yml
TrivediHeena Jan 9, 2023
12fa7d3
Update node.js.yml
TrivediHeena Jan 9, 2023
8ae28c8
Update node.js.yml
TrivediHeena Jan 9, 2023
0bcba45
Update node.js.yml
TrivediHeena Jan 10, 2023
e159e1f
Update node.js.yml
TrivediHeena Jan 10, 2023
b6ac840
Update node.js.yml
TrivediHeena Jan 10, 2023
c887bfa
Update node.js.yml
TrivediHeena Jan 10, 2023
c092871
Update node.js.yml
TrivediHeena Jan 10, 2023
0907fca
Update node.js.yml
TrivediHeena Jan 10, 2023
3486398
Update node.js.yml
TrivediHeena Jan 10, 2023
7fede23
Create Dockerfile
TrivediHeena Jan 10, 2023
5d2f986
Update node.js.yml
TrivediHeena Jan 10, 2023
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
74 changes: 74 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "master", "TrivediHeena-patch-2" ]
pull_request:
branches: [ "master", "TrivediHeena-patch-2" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x]
couchdb: [3.1]
#couchdb: ["3.1", "3.0", "2.3"]
#node-version: [10.x, 14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
with:
couchdb-version: ${{ matrix.couchdb }}
#- name: Install Dependencies
# run: npm install
# - name: Linting Files
# run: npm run lint
- name: Build Bundle
run: |
npm install -g node-gyp
npm install socket.io
npm ci
npm run build --if-present
- name: Test endpoint
run: |
curl -f http://127.0.0.1:5984/

- name: Test auth
run: |
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session

- name: Testing Bundle
working-directory: ./test
run: |
CI=true npm run test-types
# #curl -f http://127.0.0.1:9876/

deploy:
needs:
- build
# - test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
couchdb: [3.1]

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag pouchdb_auth:$(date +%s)

4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM node:10-alpine
WORKDIR /pouchdb-authentication/
RUN npm install
COPY . .