Skip to content

Commit d07f778

Browse files
authored
Set terminusx token only if it is from our repo (#374)
Otherwise it prevents PRs from forked repos to run the tests correctly. Since they can't access the secret TerminusX token.
1 parent 55e0d34 commit d07f778

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ jobs:
2727
build:
2828
needs: check
2929
runs-on: ubuntu-latest
30-
env:
31-
TERMINUSX_TOKEN: ${{ secrets.TERMINUSX_TOKEN_DEV }}
3230
strategy:
3331
matrix:
3432
python-version: ["3.8", "3.9", "3.10"]
@@ -46,6 +44,7 @@ jobs:
4644
tox -e deps
4745
- name: Test with pytest
4846
run: |
47+
[[ "$GITHUB_REPOSITORY" == "terminusdb/terminusdb-client-python" && "$GITHUB_EVENT_NAME" == "push" ]] && export TERMINUSX_TOKEN='${{ secrets.TERMINUSX_TOKEN_DEV }}'
4948
tox -e test
5049
- name: Coverage report
5150
uses: codecov/codecov-action@v2

0 commit comments

Comments
 (0)