Skip to content

Commit 0340638

Browse files
author
Babali42
committed
refacto (CI) : move to proper composite action action.yml
1 parent aba3a5e commit 0340638

2 files changed

Lines changed: 52 additions & 1 deletion

File tree

.github/actions/test/action.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test
2+
description: Run Angular/Karma, Vitest, Codecov upload, and i18n verification
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Checkout repository
7+
uses: actions/checkout@v6
8+
9+
- name: Set up Node.js
10+
uses: actions/setup-node@v6
11+
with:
12+
node-version: '24.15'
13+
14+
- name: Install dependencies
15+
run: npm install
16+
shell: bash
17+
18+
- name: Run angular/karma tests
19+
run: npm run test-ci
20+
shell: bash
21+
22+
- name: Run vitest
23+
run: npm run test-vitest-coverage
24+
shell: bash
25+
26+
- name: Upload coverage reports to Codecov
27+
uses: codecov/codecov-action@v6
28+
with:
29+
token: ${{ inputs.CODECOV_TOKEN }}
30+
files: |
31+
coverage/ng17-lib-test/lcov.info
32+
coverage/lcov.info
33+
fail_ci_if_error: true
34+
35+
- name: Verify i18n translations
36+
run: bash ./verify_i18n_json.sh
37+
shell: bash
38+
39+
inputs:
40+
codecov_token:
41+
description: 'Codecov upload token'
42+
required: true

.github/workflows/angular-tests.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,17 @@ on:
77

88
jobs:
99
test:
10+
defaults:
11+
run:
12+
working-directory: ./frontend
13+
1014
runs-on: ubuntu-latest
1115

1216
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v6
19+
1320
- name: Test
14-
uses: .github/actions/test.yml
21+
uses: ./.github/actions/test/
22+
with:
23+
codecov_token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)