Skip to content

Commit c8ff0ff

Browse files
committed
ci: Don't run both non-GUI/GUI Vim tests most of the time
Only run the full suite of Vim tests when doing a tagged release. Otherwise just either run GUI or non-GUI test on each platform. This should catch most regressions in Vim upstream functionality, as even a bad upstream merge should still exhibit the same issue in one of the other (and most MacVim pull requests do not touch Vim to begin with). This helps speeds up CI as currently it's quite time consuming to run Vim tests twice. We still run the whole thing for a release for now just to catch any potential issues.
1 parent 92e9b88 commit c8ff0ff

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/ci-macvim.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,19 @@ jobs:
6868

6969
- os: macos-13
7070
xcode: '15.2'
71+
testgui: true
7172
extra: [vimtags, check-xcodeproj-compat]
7273

7374
# Below runners use Apple Silicon.
7475
- os: macos-14
7576
xcode: '15.4'
77+
testgui: false
7678
optimized: true
7779

7880
# Most up to date OS and Xcode. Used to publish release for the main build.
7981
- os: macos-15
8082
xcode: '16.2'
83+
testgui: true
8184
publish: true
8285
optimized: true
8386

@@ -351,12 +354,13 @@ jobs:
351354
fi
352355
353356
- name: Test MacVim
357+
id: test_macvim
354358
timeout-minutes: 10
355359
run: |
356360
make ${MAKE_BUILD_ARGS} -C src macvim-tests
357361
358362
- name: Upload failed MacVim test results
359-
if: ${{ !cancelled() && failure() }}
363+
if: ${{ !cancelled() && failure() && steps.test_macvim.conclusion == 'failure' }}
360364
uses: ./.github/actions/test_macvim_artifacts
361365

362366
- name: Build Vim test binaries
@@ -370,20 +374,24 @@ jobs:
370374
make ${MAKE_BUILD_ARGS} -j${NPROC} -C src unittesttargets
371375
372376
- name: Test Vim
377+
if: startsWith(github.ref, 'refs/tags/') || !matrix.testgui
373378
timeout-minutes: 25
374-
run: make ${MAKE_BUILD_ARGS} test
375-
376-
- name: Upload failed test files
377-
if: ${{ !cancelled() && failure() }}
378-
uses: ./.github/actions/test_artifacts
379+
run: |
380+
defaults delete org.vim.MacVim # Clean up stale states
381+
make ${MAKE_BUILD_ARGS} test
379382
380383
- name: Test Vim (GUI)
384+
if: startsWith(github.ref, 'refs/tags/') || matrix.testgui
381385
timeout-minutes: 25
382386
run: |
383-
defaults delete org.vim.MacVim # Clean up stale states left from MacVim tests
387+
defaults delete org.vim.MacVim # Clean up stale states
384388
make ${MAKE_BUILD_ARGS} -C src/testdir clean
385389
make ${MAKE_BUILD_ARGS} -C src testgui
386390
391+
- name: Upload failed test files
392+
if: ${{ !cancelled() && failure() }}
393+
uses: ./.github/actions/test_artifacts
394+
387395
- name: Build MacVim dmg image
388396
if: matrix.publish && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
389397
run: |

0 commit comments

Comments
 (0)