From b1ca61b565136404e81882e2da758ac8627d85da Mon Sep 17 00:00:00 2001 From: Felipe Lema Date: Sat, 12 Aug 2023 01:08:42 -0400 Subject: [PATCH] chore: run tests only on files under source directories (#26) Co-authored-by: mohsen <36933074+smoka7@users.noreply.github.com> --- .github/workflows/test.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ec13279..c1d47877 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,10 +13,29 @@ jobs: - name: checkout uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: source-files-filter + with: + filters: | + source-files: + - 'lua/**' + - 'plugin/**' + - 'tests/**' + + - uses: Ana06/get-changed-files@v2.2.0 + id: source-files + continue-on-error: true + with: + # Format of the steps output context. + # Can be 'space-delimited', 'csv', or 'json'. + # Default: 'space-delimited' + format: 'space-delimited' + - uses: rhysd/action-setup-vim@v1 with: neovim: true version: ${{ matrix.nvim-versions }} - name: run tests + if: steps.source-files-filter.outputs.source-files == 'true' run: make test