Skip to content

Commit 04d598d

Browse files
committed
⚠️ Try using matrix for environment
1 parent d429335 commit 04d598d

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

.github/workflows/test.yaml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,21 @@ on:
2424
workflow_dispatch:
2525

2626
jobs:
27-
build:
28-
runs-on: ubuntu-latest
27+
vim-tests:
28+
strategy:
29+
matrix:
30+
os:
31+
- ubuntu-latest
32+
33+
vim:
34+
- version: v9.1.0774
35+
configure_args: --with-features=huge --enable-fail-if-missing --disable-nls
36+
37+
runs-on: ${{ matrix.os }}
38+
39+
env:
40+
PATH: /home/runner/vim-${{ matrix.vim.version }}/bin:$PATH
41+
2942
steps:
3043
- uses: actions/checkout@v2
3144
with:
@@ -36,10 +49,10 @@ jobs:
3649
with:
3750
path: |
3851
/tmp/vim
39-
/home/runner/vim-v9.1.0774
52+
/home/runner/vim-${{ matrix.vim.version }}
4053
/home/runner/.vim
4154
/home/runner/vim
42-
key: ubuntu-latest_v9.1.0774
55+
key: ${{ matrix.os }}_${{ matrix.vim.version }}
4356

4457
- uses: actions/setup-python@v5
4558
with:
@@ -48,14 +61,8 @@ jobs:
4861
- uses: rhysd/[email protected]
4962
if: steps.cache-test-dependencies.outputs.cache-hit != 'true'
5063
with:
51-
version: v9.1.0774
52-
configure-args: |
53-
--with-features=huge --enable-fail-if-missing --disable-nls
54-
55-
- name: Update PATH with cached dependencies
56-
if: steps.cache-test-dependencies.outputs.cache-hit == 'true'
57-
run: |
58-
export PATH="/home/runner/vim-v9.1.0774/bin:$PATH"
64+
version: ${{ matrix.vim.version }}
65+
configure-args: ${{ matrix.vim.configure_args }}
5966

6067
- name: Install Vader
6168
if: steps.cache-test-dependencies.outputs.cache-hit != 'true'
@@ -79,3 +86,4 @@ jobs:
7986
#
8087
# - https://github.com/junegunn/vader.vim/?tab=readme-ov-file#github-actions
8188
# - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
89+
# - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#matrix-context

0 commit comments

Comments
 (0)