Skip to content

Commit

Permalink
chore: simpler test setup (#44)
Browse files Browse the repository at this point in the history
Run tests directly instead of in Docker, having only
InfluxDB2 under docker.
  • Loading branch information
tkurki authored Dec 25, 2023
1 parent 3bd4481 commit 684a7e3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- name: Install & lint
run: npm install && npm run ci-lint
- name: Run tests against InfluxDb2
run: docker-compose run plugintest
run: npm run test
21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
version: '2'
services:
plugintest:
build: .
depends_on:
- influxdb
environment:
- INFLUX_HOST=influx2
influxdb:
container_name: influx2
image: "influxdb:2.3"
Expand All @@ -19,5 +13,4 @@ services:
- DOCKER_INFLUXDB_INIT_PASSWORD=klangisklangis
- DOCKER_INFLUXDB_INIT_ORG=signalk_org
- DOCKER_INFLUXDB_INIT_BUCKET=signalk_bucket
# - DOCKER_INFLUXDB_INIT_RETENTION: The duration the system's initial bucket should retain data. If not set, the initial bucket will retain data forever.
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=signalk_token
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"author": "Teppo Kurki <[email protected]>",
"repository": "https://github.com/tkurki/signalk-to-influxdb2",
"scripts": {
"test": "docker-compose run plugintest",
"mocha": "mocha --require ts-node/register --extensions ts src/*.test.ts --timeout 5000",
"test": "docker compose up -d && npm run build && npm run mocha",
"mocha": "mocha --require ts-node/register --extensions ts src/*.test.ts --timeout 5000 --exit",
"lint:only": "eslint src --ext .ts",
"prettier": "prettier -w src/",
"lint": "eslint -c .eslintrc.js --ext .ts --ext .js --fix src/",
Expand Down

0 comments on commit 684a7e3

Please sign in to comment.