Skip to content

Commit 41fe0f5

Browse files
authored
CI: run nightly tests only on main (#569)
* CI: run nightly tests only on main * avoid running optional tests on forks * test * skip normal tests on non-main branches
1 parent d2e3f74 commit 41fe0f5

File tree

2 files changed

+45
-38
lines changed

2 files changed

+45
-38
lines changed

.github/workflows/optional.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Optional'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
nightly:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 10
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Install project dependencies
18+
uses: ./.github/setup
19+
with:
20+
os: ubuntu-latest
21+
python-version: '3.10'
22+
23+
- name: Run pytest (against pandas nightly)
24+
run: poetry run poe pytest --nightly
25+
26+
mypy_nightly:
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 10
29+
30+
steps:
31+
- uses: actions/checkout@v3
32+
33+
- name: Install project dependencies
34+
uses: ./.github/setup
35+
with:
36+
os: ubuntu-latest
37+
python-version: '3.10'
38+
39+
- name: Run mypy tests with mypy nightly
40+
run: poetry run poe mypy --mypy_nightly

.github/workflows/test.yml

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: 'Test'
22

33
on:
4-
[push, pull_request, workflow_dispatch]
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
59

610
env:
711
MPLBACKEND: 'Agg'
@@ -25,11 +29,6 @@ jobs:
2529
os: ${{ matrix.os }}
2630
python-version: ${{ matrix.python-version }}
2731

28-
- name: Show poetry python location (Windows)
29-
shell: pwsh
30-
run: poetry run where python
31-
if: matrix.os == 'windows-latest'
32-
3332
- name: Run mypy on 'tests' (using the local stubs) and on the local stubs
3433
run: poetry run poe mypy
3534

@@ -42,22 +41,6 @@ jobs:
4241
- name: Install pandas-stubs and run tests on the installed stubs
4342
run: poetry run poe test_dist
4443

45-
nightly:
46-
runs-on: ubuntu-latest
47-
timeout-minutes: 10
48-
49-
steps:
50-
- uses: actions/checkout@v3
51-
52-
- name: Install project dependencies
53-
uses: ./.github/setup
54-
with:
55-
os: ubuntu-latest
56-
python-version: '3.10'
57-
58-
- name: Run pytest (against pandas nightly)
59-
run: poetry run poe pytest --nightly
60-
6144
precommit:
6245
runs-on: ubuntu-latest
6346
timeout-minutes: 10
@@ -66,19 +49,3 @@ jobs:
6649
- uses: actions/checkout@v3
6750

6851
- uses: pre-commit/action@v3.0.0
69-
70-
mypy_nightly:
71-
runs-on: ubuntu-latest
72-
timeout-minutes: 10
73-
74-
steps:
75-
- uses: actions/checkout@v3
76-
77-
- name: Install project dependencies
78-
uses: ./.github/setup
79-
with:
80-
os: ubuntu-latest
81-
python-version: '3.10'
82-
83-
- name: Run mypy tests with mypy nightly
84-
run: poetry run poe mypy --mypy_nightly

0 commit comments

Comments
 (0)