Skip to content

Commit 022cb13

Browse files
committed
Fix: run on-push actions in pull requests from third-party repos
The 'on-push' GH actions are not executed (within the context of main netlab repo) if the pull request comes from another repository, so we don't know whether they would pass. This change brings mypy and transformation tests back to the 'on-pull' workflow, but hopefully executes them only if the source repo is not 'ipspace/netlab'
1 parent b239d6c commit 022cb13

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/t-pull.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ jobs:
2323
run: |
2424
python -m pip install --upgrade pip
2525
pip install -r requirements.txt -r requirements-dev.txt
26+
- name: Run Mypy
27+
if: ${{ github.repository != 'ipspace/netlab' }}
28+
run: |
29+
set -e
30+
mypy -p netsim
31+
for file in netsim/extra/*/plugin.py; do
32+
python3 -m mypy $file
33+
done
34+
- name: Run transformation tests
35+
if: ${{ github.repository != 'ipspace/netlab' }}
36+
run: |
37+
cd tests
38+
PYTHONPATH="../" pytest
2639
- name: Check integration tests
2740
run: |
2841
cd tests

0 commit comments

Comments
 (0)