Roboproch commited on
Commit
cc827c8
·
1 Parent(s): 609b417

fix dipendenza pipeline CI CD

Browse files
.github/workflows/CD_docker.yml CHANGED
@@ -1,10 +1,9 @@
1
  #
2
  name: CD docker
3
 
4
- # Configures this workflow to run every time a change is pushed to the branch called `release`.
5
  on:
6
- push:
7
- branches: ['main']
8
 
9
  # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
10
  env:
 
1
  #
2
  name: CD docker
3
 
4
+ # Viene chiamato dalla pipeline CI se termina OK
5
  on:
6
+ workflow_call:
 
7
 
8
  # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
9
  env:
.github/workflows/test_ci.yml CHANGED
@@ -38,3 +38,8 @@ jobs:
38
  - name: Test with pytest
39
  run: |
40
  pytest
 
 
 
 
 
 
38
  - name: Test with pytest
39
  run: |
40
  pytest
41
+
42
+ job_call_cd: # Sblocca la pipeline CD se tutto va OK
43
+ needs: job_test
44
+ uses: ./.github/workflows/CD_docker.yml
45
+ secrets: inherit # Passa il token
CI/test_ci.py CHANGED
@@ -17,7 +17,7 @@ class TestClass :
17
 
18
  def test_accuracy(self) :
19
  # Controllo che l'accuracy sia almeno 0.5
20
- X = ld.dataset.X
21
- y = ld.dataset.y
22
  y_pred = model.predict(X)
23
  assert accuracy_score(y, y_pred)>=0.5
 
17
 
18
  def test_accuracy(self) :
19
  # Controllo che l'accuracy sia almeno 0.5
20
+ X = ld.X
21
+ y = ld.y
22
  y_pred = model.predict(X)
23
  assert accuracy_score(y, y_pred)>=0.5