forked from nightscout/cgm-remote-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nightscout:master' into master
- Loading branch information
Showing
312 changed files
with
56,057 additions
and
32,470 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,12 @@ | ||
# Browsers we support | ||
# See https://github.com/browserslist/browserslist for details | ||
|
||
> 0.25% | ||
ios_saf 9.3 | ||
ios_saf 10.3 | ||
ios_saf 13.7 | ||
ios_saf 14.8 | ||
not dead | ||
not and_uc 12.12 | ||
not ie 11 | ||
|
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[config] | ||
command = bash deploy.sh | ||
command = bash bin/azure-deploy.sh |
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 |
---|---|---|
@@ -1,23 +1,35 @@ | ||
module.exports = { | ||
"plugins": [ ], | ||
"extends": [ | ||
"eslint:recommended" | ||
'plugins': [ | ||
'security' | ||
], | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true, | ||
"mocha": true, | ||
"jquery": true | ||
'extends': [ | ||
'eslint:recommended', | ||
'plugin:security/recommended' | ||
], | ||
'parser': 'babel-eslint', | ||
'env': { | ||
'browser': true, | ||
'commonjs': true, | ||
'es6': true, | ||
'node': true, | ||
'mocha': true, | ||
'jquery': true | ||
}, | ||
"rules": { | ||
"no-unused-vars": [ | ||
"error", | ||
'rules': { | ||
'security/detect-object-injection' : 0, | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
"varsIgnorePattern": "should|expect" | ||
'varsIgnorePattern': 'should|expect' | ||
} | ||
] | ||
} | ||
}, | ||
'overrides': [ | ||
{ | ||
'files': ['lib/client/*.js'], | ||
'rules': { | ||
'security/detect-object-injection': 0 | ||
} | ||
} | ||
], | ||
}; |
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,69 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# ******** NOTE ******** | ||
|
||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ dev ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ dev ] | ||
schedule: | ||
- cron: '43 23 * * 3' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nightscout' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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 |
---|---|---|
@@ -1,34 +1,90 @@ | ||
name: CI test | ||
name: CI test and publish Docker image | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-16.04 | ||
|
||
test: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [12.x] | ||
node-version: [14.x, 16.x] | ||
mongodb-version: [4.4, 5.0, 6.0] | ||
|
||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Start MongoDB ${{ matrix.mongodb-version }} | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: ${{ matrix.mongodb-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
- name: Run Tests | ||
run: npm run-script test-ci | ||
- name: Send Coverage | ||
run: npm run-script coverage | ||
|
||
publish: | ||
name: Publish to Docker Hub | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.repository_owner == 'nightscout' | ||
env: | ||
DOCKER_IMAGE: nightscout/cgm-remote-monitor | ||
PLATFORMS: linux/amd64,linux/arm64 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Install MongoDB | ||
run: | | ||
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - | ||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list | ||
sudo apt-get update | ||
sudo apt-get install -y mongodb-org | ||
sudo apt-get install -y --allow-downgrades mongodb-org=4.4.0 mongodb-org-server=4.4.0 mongodb-org-shell=4.4.0 mongodb-org-mongos=4.4.0 mongodb-org-tools=4.4.0 | ||
- name: Start MongoDB | ||
run: sudo systemctl start mongod | ||
- name: Run Tests | ||
run: npm run-script test-ci | ||
- name: Send Coverage | ||
run: npm run-script coverage | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASS }} | ||
- name: Clean git Checkout | ||
if: success() | ||
uses: actions/checkout@v3 | ||
- name: Build, tag and push the dev Docker image | ||
if: success() && github.ref == 'refs/heads/dev' | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
no-cache: true | ||
platforms: ${{ env.PLATFORMS }} | ||
tags: | | ||
${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }} | ||
${{ env.DOCKER_IMAGE }}:latest_dev | ||
- name: Get Nightscout release version | ||
if: success() && github.ref == 'refs/heads/master' | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@master | ||
- name: Build, tag and push the master Docker image | ||
if: success() && github.ref == 'refs/heads/master' | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
no-cache: true | ||
platforms: ${{ env.PLATFORMS }} | ||
tags: | | ||
${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} | ||
${{ env.DOCKER_IMAGE }}:latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10.16.0 | ||
16.16.0 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.