diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e826bdd8..3c4c8840 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,20 @@ jobs: - nightly steps: - uses: actions/checkout@v4 + - name: Get date + id: get-date + run: | + echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT + - uses: actions/cache/restore@v4 + id: cache-primes-restore + with: + key: ${{ runner.os }}-${{ matrix.nvim_version }}-${{ steps.get-date.outputs.date }} + path: | + $HOME/.cargo/bin + $HOME/nvim-${{ matrix.nvim_version }} + /usr/local/busted + /usr/local/fennel + /usr/local/vusted # TODO: Revert to gh-actions-lua when it's fixed to be up-to-date, and # remove unnecessary `sudo` in installing test dependencies. - name: Install luarocks @@ -36,6 +50,15 @@ jobs: with: neovim: true version: ${{ matrix.nvim_version }} + - uses: actions/cache/save@v4 + with: + key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }} + path: | + $HOME/.cargo/bin + $HOME/nvim-${{ matrix.nvim_version }} + /usr/local/busted + /usr/local/fennel + /usr/local/vusted - name: Run tests env: VUSTED_EXTRA_FLAGS: "--defer-print --suppress-pending"