Skip to content

Commit f5bbf61

Browse files
committed
e2es are now testing the app inside the docker container
1 parent e0a694a commit f5bbf61

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ jobs:
3636
- name: Run Integration tests
3737
run: DEBUG=replay* npm run coverage || echo 'Test run failed replay no longer is working with latest nano which uses node fetch'
3838

39+
- name: Upload coverage report
40+
uses: actions/upload-artifact@v5
41+
if: success() || failure()
42+
with:
43+
name: coverage
44+
path: coverage/
45+
retention-days: 3
46+
3947
- name: Start docker compose services
4048
run: docker compose up -d && sleep 5
4149

@@ -54,6 +62,10 @@ jobs:
5462
SOURCE_URL: ${{ secrets.SOURCE_URL }}
5563
DEBUG: 'none'
5664

65+
- name: Show docker compose logs
66+
if: success() || failure()
67+
run: docker compose logs --no-color --timestamps || true
68+
5769
- name: Coveralls
5870
if: success() || failure()
5971
uses: coverallsapp/github-action@master

nyc.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ module.exports = {
1010
functions: 65,
1111
lines: 76,
1212
statements: 76,
13-
reporter: ['text', 'lcov'],
13+
reporter: ['html', 'text', 'lcov'],
1414
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
},
6363
"scripts": {
6464
"docker:build": "docker build -t fielddb-auth .",
65-
"test:integration": "echo 'module.exports = { usersDbConnection: { url: \"http://couchdb:5984\" } };' > config/local.js && docker compose up -d && sleep 3 && docker compose logs && npm run setup && npm run test:deprecated",
65+
"test:e2e": "echo 'module.exports = { usersDbConnection: { url: \"http://couchdb:5984\" } };' > config/local.js && docker compose up -d && sleep 3 && docker compose logs && npm run setup && npm run test:deprecated",
6666
"docker:test:no-cache": "echo 'module.exports = { usersDbConnection: { url: \"http://couchdb:5984\" } };' > config/local.js && docker compose build --no-cache && docker compose up -d && sleep 15 && docker compose logs && npm run setup && npm run test:deprecated",
6767
"coverage": "NODE_ENV=test BUNYAN_LOG_LEVEL=FATAL nyc npm test",
6868
"lint": "eslint ",
@@ -71,7 +71,7 @@
7171
"start": "node ./bin/www.js",
7272
"test": "SOURCE_URL=${SOURCE_URL:-https://public:none@corpusdev.example.org} NODE_ENV=test NODE_TLS_REJECT_UNAUTHORIZED=0 mocha --timeout 100000 --recursive test",
7373
"test:debug": "node-debug _mocha test/integration/oauth.js",
74-
"test:deprecated": "DEBUG=${DEBUG:-lib:user} REPLAY=bloody NODE_TLS_REJECT_UNAUTHORIZED=0 URL=https://localhost:3183 nyc mocha --timeout 25000 test/routes/deprecated-spec.js",
74+
"test:deprecated": "DEBUG=${DEBUG:-lib:user} REPLAY=bloody NODE_TLS_REJECT_UNAUTHORIZED=0 URL=https://localhost:3183 mocha --timeout 25000 test/routes/deprecated-spec.js",
7575
"test:fielddb": "NODE_ENV=localhost jasmine-node node_modules/fielddb/tests",
7676
"test:production": "ls config/production.js",
7777
"watch": "nodemon ./bin/www.js"

0 commit comments

Comments
 (0)