Skip to content

Commit f7e2cb7

Browse files
ubergesundheitdependabot-preview[bot]felixerdympfeil
authored
Sync master from development (#395)
* Bump simple-statistics from 7.3.1 to 7.3.2 (#370) Bumps [simple-statistics](https://github.com/simple-statistics/simple-statistics) from 7.3.1 to 7.3.2. - [Release notes](https://github.com/simple-statistics/simple-statistics/releases) - [Changelog](https://github.com/simple-statistics/simple-statistics/blob/master/CHANGELOG.md) - [Commits](simple-statistics/simple-statistics@v7.3.1...v7.3.2) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump csv-parse from 4.11.1 to 4.13.0 (#371) Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.11.1 to 4.13.0. - [Release notes](https://github.com/wdavidw/node-csv-parse/releases) - [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md) - [Commits](adaltas/node-csv-parse@v4.11.1...v4.13.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump csv-parse from 4.13.0 to 4.14.0 (#373) Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.13.0 to 4.14.0. - [Release notes](https://github.com/wdavidw/node-csv-parse/releases) - [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md) - [Commits](adaltas/node-csv-parse@v4.13.0...v4.14.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * build docs also for minor versions and patches * Bump config from 3.3.2 to 3.3.3 (#380) Bumps [config](https://github.com/lorenwest/node-config) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/lorenwest/node-config/releases) - [Changelog](https://github.com/lorenwest/node-config/blob/master/History.md) - [Commits](https://github.com/lorenwest/node-config/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump got from 11.7.0 to 11.8.0 (#361) * Bump csv-stringify from 5.5.1 to 5.5.3 (#378) * Bump ms from 2.1.2 to 2.1.3 (#381) Bumps [ms](https://github.com/vercel/ms) from 2.1.2 to 2.1.3. - [Release notes](https://github.com/vercel/ms/releases) - [Commits](vercel/ms@2.1.2...2.1.3) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * [Security] Bump ini from 1.3.5 to 1.3.8 (#385) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. **This update includes a security fix.** - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.8) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump got from 11.8.0 to 11.8.1 (#382) Bumps [got](https://github.com/sindresorhus/got) from 11.8.0 to 11.8.1. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](sindresorhus/got@v11.8.0...v11.8.1) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump simple-statistics from 7.3.2 to 7.4.0 (#386) Bumps [simple-statistics](https://github.com/simple-statistics/simple-statistics) from 7.3.2 to 7.4.0. - [Release notes](https://github.com/simple-statistics/simple-statistics/releases) - [Changelog](https://github.com/simple-statistics/simple-statistics/blob/master/CHANGELOG.md) - [Commits](simple-statistics/simple-statistics@v7.3.2...v7.4.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump csv-parse from 4.14.0 to 4.14.2 (#387) Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.14.0 to 4.14.2. - [Release notes](https://github.com/wdavidw/node-csv-parse/releases) - [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md) - [Commits](adaltas/node-csv-parse@v4.14.0...v4.14.2) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump csv-stringify from 5.5.3 to 5.6.0 (#390) Bumps [csv-stringify](https://github.com/adaltas/node-csv-stringify) from 5.5.3 to 5.6.0. - [Release notes](https://github.com/adaltas/node-csv-stringify/releases) - [Changelog](https://github.com/adaltas/node-csv-stringify/blob/master/CHANGELOG.md) - [Commits](adaltas/node-csv-stringify@v5.5.3...v5.6.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Replace Travis CI with GitHub Actions (#393) * run tests in github workflow * try without tty * add deploy-docs ci step * fix yaml syntax * try npx * only deploy docs on release publish * cleanup * log in to docker * execute on master and development * Update .github/workflows/test.yaml * Update README.md * Bump grpc from 1.24.3 to 1.24.4 (#374) Bumps [grpc](https://github.com/grpc/grpc-node) from 1.24.3 to 1.24.4. - [Release notes](https://github.com/grpc/grpc-node/releases) - [Commits](https://github.com/grpc/grpc-node/commits) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Matthias Pfeil <[email protected]> * Bump millify from 3.3.0 to 3.5.0 (#392) Bumps [millify](https://github.com/izolate/millify) from 3.3.0 to 3.5.0. - [Release notes](https://github.com/izolate/millify/releases) - [Changelog](https://github.com/izolate/millify/blob/master/CHANGELOG.md) - [Commits](izolate/millify@v3.3.0...v3.5.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Gerald Pape <[email protected]> * rename access_token to Authorization in docs (#394) * rename access_token to Authorization in docs * update README.md Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: felixerdy <[email protected]> Co-authored-by: Matthias Pfeil <[email protected]> Co-authored-by: Felix Erdmann <[email protected]>
1 parent 2a0db81 commit f7e2cb7

File tree

13 files changed

+179
-141
lines changed

13 files changed

+179
-141
lines changed

.dockerignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ userimages
33
*.yml
44
Dockerfile
55
.eslintrc.js
6-
.travis.yml
6+
.github
77
doc
88
version.js
99
.dockerignore

.github/workflows/deploy-docs.yaml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Deploy docs
2+
3+
on:
4+
release:
5+
branches:
6+
- master
7+
types:
8+
- published
9+
pull_request:
10+
branches:
11+
- master
12+
- development
13+
14+
jobs:
15+
test:
16+
name: Deploy docs
17+
runs-on: ubuntu-20.04
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Gather branch information
22+
id: version_info
23+
continue-on-error: true
24+
run: |
25+
version=${GITHUB_REF##*/}
26+
echo "##[set-output name=version;]${version}"
27+
28+
echo "We're running on version ${version}"
29+
30+
- name: Append the current version to the introduction document
31+
run: |
32+
sed -i "1 s|$| ${{ steps.version_info.outputs.version }}|" apidoc/introduction.md
33+
34+
- name: Run apidoc
35+
run: |
36+
npx [email protected] -i . -f js -e node_modules
37+
38+
- name: Deploy apidocs for git tags
39+
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
40+
run: |
41+
set -e
42+
# reset the changes to please git
43+
git checkout -- apidoc/introduction.md
44+
45+
# checkout gh-pages branch
46+
git remote set-branches --add origin gh-pages
47+
git fetch
48+
git checkout -t origin/gh-pages
49+
50+
# delete everything except for the doc folder
51+
find . ! \( -path './.git' -prune \) ! \( -path './doc' -prune \) ! -name '.' ! -name '..' -print0 | xargs -0 rm -rf --
52+
53+
# move content of doc to .
54+
mv doc/* .
55+
56+
# delete doc folder
57+
rm -rf doc
58+
59+
# add .nojekyll file
60+
touch .nojekyll
61+
62+
# add everything
63+
git add -A
64+
65+
# tell git who you are
66+
git config user.name "GitHub-CI"
67+
git config user.email "[email protected]"
68+
69+
# commit
70+
git commit -m "apidoc build for ${{ steps.version_info.outputs.version }} by GitHub Actions"
71+
72+
# push to github
73+
git push "https://${{ github.token }}@github.com/${{ github.repository }}.git" gh-pages

.github/workflows/test.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test and build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- development
8+
pull_request:
9+
branches:
10+
- master
11+
- development
12+
13+
jobs:
14+
test:
15+
name: Run tests
16+
runs-on: ubuntu-20.04
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Login to DockerHub
20+
uses: docker/login-action@v1
21+
with:
22+
username: ${{ secrets.DOCKER_HUB_USER }}
23+
password: ${{ secrets.DOCKER_HUB_PASS }}
24+
25+
- name: Execute tests
26+
run: |
27+
yarn test

.scripts/deploy-docs.sh

-56
This file was deleted.

.scripts/run-tests.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ function executeTests() {
4545
runComposeCommand down -v --remove-orphans
4646

4747
if [[ -z $only_models_tests ]]; then
48-
runComposeCommand up -d --force-recreate --remove-orphans
48+
runComposeCommand up --quiet-pull -d --force-recreate --remove-orphans
4949

5050
# Allow the dust to settle
5151
sleep 3
5252

53-
runComposeCommand exec osem-api yarn mocha --exit tests/waitForHttp.js tests/tests.js
53+
runComposeCommand exec -T osem-api yarn mocha --exit tests/waitForHttp.js tests/tests.js
5454
runComposeCommand stop osem-api
5555
fi
5656

57-
runComposeCommand up -d --remove-orphans db mailer
57+
runComposeCommand up --quiet-pull -d --remove-orphans db mailer
5858
# use ./node_modules/.bin/mocha because the workspace does not have the devDependency mocha
59-
runComposeCommand run --workdir=/usr/src/app/packages/models osem-api ../../node_modules/.bin/mocha --exit test/waitForDatabase test/index
59+
runComposeCommand run -T --workdir=/usr/src/app/packages/models osem-api ../../node_modules/.bin/mocha --exit test/waitForDatabase test/index
6060
}
6161

6262
case "$cmd" in

.travis.yml

-20
This file was deleted.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ yarn test
6060
- Bleeding edge and possibly unstable development version
6161
- gh-pages
6262
- Hosts API docs for [https://docs.opensensemap.org/](https://docs.opensensemap.org/)
63-
- Is generated and pushed to github by Travis CI
63+
- Is generated and pushed to GitHub by GitHub Actions [file](.github/workflows/test.yaml)
6464

6565
### Tags and Versions
6666
Git Tags are used for Docker hub builds (like `v1`). Version number is increased by one for each new version. Docker images are built automatically by the Docker hub for all tags starting with `v`
@@ -85,4 +85,3 @@ Every commit on branch `development` will be built with the tag `development`.
8585
[MongoDB]:http://www.mongodb.com/
8686
[openSenseMap]:https://opensensemap.org/
8787
[senseBox]:https://sensebox.de/
88-

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"NOTpretest": "node tests/waitForHttp",
1313
"tag-container": "./.scripts/npm_tag-container.sh",
1414
"lint": "eslint --ignore-pattern node_modules --fix \"{tests,packages}/**/*.js\"",
15-
"deploy-docs": "./.scripts/deploy-docs.sh",
1615
"create-version-file": "node .scripts/create-version.js"
1716
},
1817
"devDependencies": {
@@ -21,11 +20,11 @@
2120
"chai": "^4.1.2",
2221
"chakram": "^1.5.0",
2322
"cheerio": "^1.0.0-rc.2",
24-
"csv-parse": "^4.11.1",
23+
"csv-parse": "^4.14.2",
2524
"eslint": "6.8.0",
2625
"mimelib": "^0.3.1",
2726
"mocha": "^7.1.2",
2827
"mqtt": "^3.0.0",
2928
"randomgeojson": "^1.0.0"
3029
}
31-
}
30+
}

packages/api/lib/controllers/measurementsController.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const getDataMulti = async function getDataMulti (req, res, next) {
219219
* @apiParam (RequestBody) {String} value the measured value of the sensor. Also accepts JSON float numbers.
220220
* @apiParam (RequestBody) {RFC3339Date} [createdAt] the timestamp of the measurement. Should conform to RFC 3339. Is needed when posting with Location Values!
221221
* @apiParam (RequestBody) {Location} [location] the WGS84-coordinates of the measurement.
222-
* @apiHeader {String} access_token Box' unique access_token. Will be used as authorization token if box has auth enabled (e.g. useAuth: true)
222+
* @apiHeader {String} Authorization Box' unique access_token. Will be used as authorization token if box has auth enabled (e.g. useAuth: true)
223223
*/
224224
const postNewMeasurement = async function postNewMeasurement (req, res, next) {
225225
const { boxId, sensorId, value, createdAt, location } = req._userParams;
@@ -277,7 +277,7 @@ const postNewMeasurement = async function postNewMeasurement (req, res, next) {
277277
* @apiUse LocationBody
278278
* @apiParam {String} [luftdaten] Specify whatever you want (like `luftdaten=1`. Signals the api to treat the incoming data as luftdaten.info formatted json.
279279
* * @apiParam {String} [hackair] Specify whatever you want (like `hackair=1`. Signals the api to treat the incoming data as hackair formatted json.
280-
* @apiHeader {String} access_token Box' unique access_token. Will be used as authorization token if box has auth enabled (e.g. useAuth: true)
280+
* @apiHeader {String} Authorization Box' unique access_token. Will be used as authorization token if box has auth enabled (e.g. useAuth: true)
281281
* @apiParamExample {application/json} JSON-Object:
282282
* {
283283
* "sensorID": "value",

packages/api/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
"@turf/triangle-grid": "^6.0.1",
2222
"apicache": "^1.4.0",
2323
"bunyan": "^1.8.14",
24-
"config": "^3.3.2",
25-
"csv-stringify": "^5.5.1",
24+
"config": "^3.3.3",
25+
"csv-stringify": "^5.6.0",
2626
"dashify": "^2.0.0",
27-
"got": "^11.7.0",
27+
"got": "^11.8.1",
2828
"honeybadger": "^1.4.0",
2929
"isemail": "^3.0.0",
3030
"jsonwebtoken": "^8.1.0",
31-
"millify": "^3.3.0",
31+
"millify": "^3.5.0",
3232
"moment": "^2.29.1",
33-
"ms": "^2.1.1",
33+
"ms": "^2.1.3",
3434
"restify": "^5.2.0",
3535
"restify-errors": "^8.0.2",
36-
"simple-statistics": "^7.3.1",
36+
"simple-statistics": "^7.4.0",
3737
"stringify-stream": "^1.0.5",
3838
"uuid": "^7.0.3"
3939
},

packages/models/.npmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
test
22
.eslintrc*
3-
.travis.yml
3+
.github
44
.gitignore
55
.scripts
66
.npmignore

packages/models/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"@sensebox/sketch-templater": "^1.8.3",
1010
"bcrypt": "^5.0.0",
1111
"bunyan": "^1.8.14",
12-
"config": "^3.3.2",
13-
"got": "^11.7.0",
14-
"grpc": "^1.24.3",
12+
"config": "^3.3.3",
13+
"got": "^11.8.1",
14+
"grpc": "^1.24.4",
1515
"isemail": "^3.0.0",
1616
"jsonpath": "^1.0.0",
1717
"lodash.isequal": "^4.5.0",

0 commit comments

Comments
 (0)