🤦 Use name not uses for custom step
#42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - .github/workflows/**/*.yaml | |
| - autoload/**/*.vim | |
| - plugin/**/*.vim | |
| - scripts/**/*.py | |
| - scripts/**/*.sh | |
| - tests/**/*.vader | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - .github/workflows/**/*.yaml | |
| - autoload/**/*.vim | |
| - plugin/**/*.vim | |
| - scripts/**/*.py | |
| - scripts/**/*.sh | |
| - tests/**/*.vader | |
| workflow_dispatch: | |
| jobs: | |
| vim-tests: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| vim: | |
| - version: v9.1.0774 | |
| configure_args: --with-features=huge --enable-fail-if-missing --disable-nls | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/cache@v4 | |
| id: cache-test-dependencies | |
| with: | |
| path: | | |
| /tmp/vim | |
| /home/runner/vim-${{ matrix.vim.version }} | |
| /home/runner/.vim | |
| /home/runner/vim | |
| key: ${{ matrix.os }}_${{ matrix.vim.version }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - uses: rhysd/[email protected] | |
| if: steps.cache-test-dependencies.outputs.cache-hit != 'true' | |
| with: | |
| version: ${{ matrix.vim.version }} | |
| configure-args: ${{ matrix.vim.configure_args }} | |
| - name: Install Vader | |
| if: steps.cache-test-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -vp ~/.vim/plugged | |
| pushd ~/.vim/plugged | |
| git clone https://github.com/junegunn/vader.vim.git | |
| popd | |
| - name: Pre-pend custom Vim install location to `PATH` environment variable | |
| if: steps.cache-test-dependencies.outputs.cache-hit == 'true' | |
| run: | | |
| echo "$HOME/vim-${{ matrix.vim.version }}/bin:${{ env.PATH }}" >> $GITHUB_ENV | |
| - name: Test units | |
| run: | | |
| scripts/vader-run-tests.sh --test units --cicd > /dev/null | |
| # - name: Test mocks | |
| # run: | | |
| # scripts/vader-run-tests.sh --test mocks --cicd > /dev/null | |
| ## | |
| # Attribution: | |
| # | |
| # - https://github.com/junegunn/vader.vim/?tab=readme-ov-file#github-actions | |
| # - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables | |
| # - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#matrix-context | |
| # - https://stackoverflow.com/questions/62716758/how-to-extend-environment-variables-in-github-actions-with-existing-ones |