Skip to content

Commit 0e129ac

Browse files
authored
build: migrate deprecated action and remove pip cache (#175)
build: migrate deprecated action and conditionally setup python and run tests Signed-off-by: Ruben Romero Montes <rromerom@redhat.com>
1 parent 15ff3e1 commit 0e129ac

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
go-version: '1.20.1'
5353

5454
- name: Setup Gradle
55-
uses: gradle/gradle-build-action@v3
55+
uses: gradle/actions/setup-gradle@v4
5656

5757
- name: Install project modules
5858
run: npm ci

.github/workflows/stage.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787

8888
- name: setup Python
8989
uses: actions/setup-python@v4
90+
if: steps.test-check.outputs.retest-is-needed == 'true'
9091
with:
9192
python-version: '3.9'
9293
cache: 'pip'
@@ -95,21 +96,16 @@ jobs:
9596
run: |
9697
echo "python-bin-location=$(echo $pythonLocation)/bin" >> $GITHUB_OUTPUT
9798
98-
9999
- name: re-test Unit-Tests + Integration Tests
100+
if: steps.test-check.outputs.retest-is-needed == 'true'
100101
env:
101-
RETEST_IS_NECESSARY: ${{ steps.test-check.outputs.retest-is-needed}}
102102
TRIGGERING_FILE: ${{ steps.test-check.outputs.triggering-file}}
103103
run: |
104-
if [[ $RETEST_IS_NECESSARY == "true" ]]; then
105-
echo "Re-test was triggered!!, triggering changed file - $TRIGGERING_FILE"
106-
echo "Running Again Unit-tests =>"
107-
npm run test
108-
echo "Running Again Integration tests =>"
109-
npm run integration-tests
110-
else
111-
echo "Re-test of library is not needed, continuing to deployment!"
112-
fi
104+
echo "Re-test was triggered!!, triggering changed file - $TRIGGERING_FILE"
105+
echo "Running Again Unit-tests =>"
106+
npm run test
107+
echo "Running Again Integration tests =>"
108+
npm run integration-tests
113109
114110
- name: Publish package
115111
env:

0 commit comments

Comments
 (0)