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'
38-
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
32+ echo 'module.exports = { usersDbConnection: { url: "http://couchdb:5984" }};' > config/local.js
4633
4734 - name : Start docker compose services
4835 run : docker compose up -d && sleep 5
5643 SOURCE_URL : ${{ secrets.SOURCE_URL }}
5744 DEBUG : ' none'
5845
59- - name : Run E2E tests
60- 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'
6148 env :
6249 SOURCE_URL : ${{ secrets.SOURCE_URL }}
6350 DEBUG : ' none'
@@ -66,12 +53,52 @@ jobs:
6653 if : success() || failure()
6754 run : docker compose logs --no-color --timestamps || true
6855
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
6983 - name : Coveralls
7084 if : success() || failure()
7185 uses : coverallsapp/github-action@master
7286 with :
7387 github-token : ${{ secrets.GITHUB_TOKEN }}
7488
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'
75102 - name : Run UI tests
76103 run : npm run test:ui
77104 timeout-minutes : 5
0 commit comments