2727
2828jobs :
2929 unit-test-backend :
30- name : Backend
30+ name : Backend Unit Tests
3131 runs-on : blacksmith-4vcpu-ubuntu-2204
3232 env :
33- COVERAGE_ENABLED : ${{ inputs.collectCoverage }}
33+ COVERAGE_ENABLED : ${{ inputs.collectCoverage }} # Coverage collected when true
3434 steps :
3535 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636 with :
@@ -41,20 +41,54 @@ jobs:
4141 with :
4242 node-version : ${{ inputs.nodeVersion }}
4343
44- - name : Test
45- run : pnpm test:ci:backend
44+ - name : Test Unit
45+ run : pnpm test:ci:backend:unit
46+
47+ - name : Upload test results to Codecov
48+ if : ${{ !cancelled() }}
49+ uses : codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
50+ with :
51+ token : ${{ secrets.CODECOV_TOKEN }}
52+ name : backend-unit
53+
54+ - name : Upload coverage to Codecov
55+ uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
56+ with :
57+ token : ${{ secrets.CODECOV_TOKEN }}
58+ flags : backend-unit
59+ name : backend-unit
60+
61+ integration-test-backend :
62+ name : Backend Integration Tests
63+ runs-on : blacksmith-4vcpu-ubuntu-2204
64+ env :
65+ COVERAGE_ENABLED : ${{ inputs.collectCoverage }} # Coverage collected when true
66+ steps :
67+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
68+ with :
69+ ref : ${{ inputs.ref }}
70+
71+ - name : Build
72+ uses : n8n-io/n8n/.github/actions/setup-nodejs-blacksmith@f5fbbbe0a28a886451c886cac6b49192a39b0eea # v1.104.1
73+ with :
74+ node-version : ${{ inputs.nodeVersion }}
75+
76+ - name : Test Integration
77+ run : pnpm test:ci:backend:integration
4678
4779 - name : Upload test results to Codecov
4880 if : ${{ !cancelled() }}
4981 uses : codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
5082 with :
5183 token : ${{ secrets.CODECOV_TOKEN }}
84+ name : backend-integration
5285
5386 - name : Upload coverage to Codecov
5487 uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
5588 with :
5689 token : ${{ secrets.CODECOV_TOKEN }}
57- flags : backend
90+ flags : backend-integration
91+ name : backend-integration
5892
5993 unit-test-frontend :
6094 name : Frontend (${{ matrix.shard }}/2)
97131 unit-test :
98132 name : Unit tests
99133 runs-on : ubuntu-latest
100- needs : [unit-test-backend, unit-test-frontend]
134+ needs : [unit-test-backend, integration-test-backend, unit-test-frontend]
101135 if : always()
102136 steps :
103137 - name : Fail if tests failed
104- if : needs.unit-test-backend.result == 'failure' || needs.unit-test-frontend.result == 'failure'
138+ if : needs.unit-test-backend.result == 'failure' || needs.integration-test-backend.result == 'failure' || needs. unit-test-frontend.result == 'failure'
105139 run : exit 1
0 commit comments