@@ -2,21 +2,16 @@ name: Code CI
22
33on :
44 push :
5- branches :
6- # Restricting to these branches and tags stops duplicate jobs on internal
7- # PRs but stops CI running on internal branches without a PR. Delete the
8- # next 5 lines to restore the original behaviour
9- - master
10- - main
11- tags :
12- - " *"
135 pull_request :
146 schedule :
157 # Run every Monday at 8am to check latest versions of dependencies
168 - cron : " 0 8 * * MON"
179
1810jobs :
1911 lint :
12+ # pull requests are a duplicate of a branch push if they are from within the
13+ # same repo. Skip these
14+ if : github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
2015 runs-on : " ubuntu-latest"
2116 steps :
2217 - name : Checkout
2823 tox -e pre-commit,mypy
2924
3025 wheel :
26+ if : github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
3127 strategy :
3228 fail-fast : false
3329 matrix :
5955 run : pipx run --python $(which python${{ matrix.python }}) --spec dist/*.whl python3-pip-skeleton --version
6056
6157 test :
58+ if : github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
6259 strategy :
6360 fail-fast : false
6461 matrix :
@@ -98,17 +95,16 @@ jobs:
9895 - name : Install with locked dependencies
9996 if : matrix.lock
10097 run : |
101- echo '# runtime dependencies' > requirements.txt
102- echo '# developer dependencies' > requirements_dev.txt
103- # above avoids zero length requirements files
98+ touch requirements.txt
99+ touch requirements_dev.txt
104100 pip install -r requirements.txt -e .
105101 pip freeze --exclude-editable >> requirements.txt
106102 pip install -r requirements_dev.txt -e .[dev]
107103 pip freeze --exclude-editable >> requirements_dev.txt
108104
109105 - name : Install with latest dependencies
110106 if : ${{ ! matrix.lock }}
111- run : pip install -e .[dev]
107+ run : pip install .[dev]
112108
113109 - name : Run tests
114110 run : pytest tests
0 commit comments