fix bug in unit testing, now it saves the reports only if the repository is the original one and not a fork
@@ -45,17 +45,17 @@ jobs:
run: |
FAST_TEST=True USE_GPU=False python -m unittest
- name: test success
- if: success() && github.event_name == 'push'
+ if: success() && github.event_name == 'push' && github.repository == 'vlomonaco/avalanche'
run: |
rm -f .github/packages-info/fail-${{ matrix.python-version }}-*
rm -f .github/packages-info/success-${{ matrix.python-version }}-*
conda list > $".github/packages-info/success-"${{ matrix.python-version }}"-"$GITHUB_SHA".txt"
- name: test failure
- if: failure() && github.event_name == 'push'
+ if: failure() && github.event_name == 'push' && github.repository == 'vlomonaco/avalanche'
run: |
conda list > $".github/packages-info/fail-"${{ matrix.python-version }}"-"$GITHUB_SHA".txt"
- name: commit changes
- if: always() && github.event_name == 'push'
+ if: always() && github.event_name == 'push' && github.repository == 'vlomonaco/avalanche'
run: |
git config --local user.email ${{ secrets.EMAIL }}
git config --local user.name ${{ secrets.NAME }}
@@ -64,7 +64,7 @@ jobs:
git commit -m "Update packages files" -a || true
git pull
- name: Push changes
- if: always() && github.event_name == 'push'
+ if: always() && github.event_name == 'push' && github.repository == 'vlomonaco/avalanche'
continue-on-error: true
uses: ad-m/github-push-action@master
with:
