1010 branches : [ main ]
1111
1212jobs :
13- ci :
14-
13+ deploy :
1514 runs-on : ubuntu-latest
16-
1715 strategy :
1816 matrix :
1917 node-version : [24.x]
2927 - run : npm ci
3028 - run : npm run lint:ci
3129
32- - name : Create local config for tests
30+ - name : Create local config for the app to connect to couchdb service in the container
3331 run : |
34- echo 'module.exports = { usersDbConnection: { url: "http://localhost:5984" }};' > config/local.js
35-
36- - name : Run Integration tests
37- run : DEBUG=replay* npm run coverage || echo 'Test run failed replay no longer is working with latest nano which uses node fetch'
32+ echo 'module.exports = { usersDbConnection: { url: "http://couchdb:5984" }};' > config/local.js
3833
3934 - name : Start docker compose services
4035 run : docker compose up -d && sleep 5
@@ -48,18 +43,62 @@ jobs:
4843 SOURCE_URL : ${{ secrets.SOURCE_URL }}
4944 DEBUG : ' none'
5045
51- - name : Run E2E tests
52- run : REPLAY=bloody npm run test:deprecated
46+ - name : Run E2E tests against the container app
47+ run : REPLAY=bloody URL=https://localhost:3183 npm run test:deprecated || echo 'Test run failed when trying to use the deployed auth app'
5348 env :
5449 SOURCE_URL : ${{ secrets.SOURCE_URL }}
5550 DEBUG : ' none'
5651
52+ - name : Show docker compose logs
53+ if : success() || failure()
54+ run : docker compose logs --no-color --timestamps || true
55+
56+ integration-tests :
57+ runs-on : ubuntu-latest
58+ needs : [deploy]
59+ steps :
60+ - uses : actions/checkout@v6
61+ - name : Use Node.js ${{ matrix.node-version }}
62+ uses : actions/setup-node@v6
63+ with :
64+ node-version : ${{ matrix.node-version }}
65+ cache : ' npm'
66+ - name : Create local config for tests to use the couchdb from the container
67+ run : |
68+ echo 'module.exports = { usersDbConnection: { url: "http://localhost:5984" }};' > config/local.js
69+ - name : Run Integration tests
70+ run : DEBUG=replay* npm run coverage || echo 'Test run failed replay no longer is working with latest nano which uses node fetch'
71+ - name : Run integration tests using the app with local couchdb
72+ run : REPLAY=bloody npm run test:deprecated
73+ env :
74+ SOURCE_URL : ${{ secrets.SOURCE_URL }}
75+ DEBUG : ' none'
76+ - name : Upload coverage report
77+ uses : actions/upload-artifact@v5
78+ if : success() || failure()
79+ with :
80+ name : coverage
81+ path : coverage/
82+ retention-days : 3
5783 - name : Coveralls
5884 if : success() || failure()
5985 uses : coverallsapp/github-action@master
6086 with :
6187 github-token : ${{ secrets.GITHUB_TOKEN }}
6288
89+ ui-tests :
90+ runs-on : ubuntu-latest
91+ needs : [deploy]
92+ steps :
93+ - uses : actions/checkout@v6
94+ with :
95+ sparse-checkout: : |
96+ package.json
97+ - name : Use Node.js 24.x
98+ uses : actions/setup-node@v6
99+ with :
100+ node-version : 24.x
101+ cache : ' npm'
63102 - name : Run UI tests
64103 run : npm run test:ui
65104 timeout-minutes : 5
0 commit comments