@@ -42,21 +42,54 @@ jobs:
4242    steps :
4343      - uses : actions/checkout@v4 
4444      - uses : actions/setup-node@v4 
45+         with :
46+           node-version : 18.20.1 
4547      - name : Cache node_modules 
4648        uses : actions/cache@v4 
4749        with :
4850          path : ' **/node_modules' 
4951          key : ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} 
52+       - name : install dependencies 
53+         run : yarn install --frozen-lockfile --non-interactive --production=false 
5054      - name : Login on dockerhub 
5155        run : echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin 
5256      - name : Start docker container 
5357        run : docker compose up -d; sleep 20 
58+       - name : Run tests with coverage 
59+         run : yarn test:coverage 
60+       - name : Upload coverage artifacts 
61+         uses : actions/upload-artifact@v4 
62+         with :
63+           name : coverage-reports 
64+           path : coverage/clover.xml   #  Assure-toi que c'est le bon chemin
65+ 
66+   send-coverage :
67+     name : Send coverage 
68+     runs-on : ubuntu-latest 
69+     timeout-minutes : 5 
70+     needs : [test]   #  Seulement test, pas test-cloud
71+     if : github.event_name == 'pull_request' 
72+     permissions :
73+       contents : read 
74+       id-token : write 
75+     steps :
76+       - uses : actions/checkout@v4 
77+       - uses : actions/setup-node@v4 
78+         with :
79+           node-version : 18.20.1   #  Ta version
80+       - uses : actions/cache@v4 
81+         with :
82+           path : ' **/node_modules' 
83+           key : ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}   #  Ton pattern
84+       - name : Download all artifacts 
85+         uses : actions/download-artifact@v4 
86+         with :
87+           path : reports 
5488      - name : Send coverage 
55- 56-         env :
57-           CC_TEST_REPORTER_ID : ${{ secrets.CC_TEST_REPORTER_ID }} 
89+         uses : qltysh/qlty-action/coverage@8d5c844f32f80364ccc135534671640466e7f610  # v1.1
5890        with :
59-           coverageCommand : yarn test:coverage 
91+           oidc : true 
92+           files : ${{github.workspace}}/reports/**/clover.xml 
6093
6194  deploy :
6295    name : Release package 
0 commit comments