Skip to content

test: add integration tests using cypress and a custom terminal view #467

test: add integration tests using cypress and a custom terminal view

test: add integration tests using cypress and a custom terminal view #467

Workflow file for this run

---
name: Run tests
on:
pull_request: ~
push:
branches:
- main
jobs:
build:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
neovim_version: ["nightly", "stable"]
steps:
- uses: actions/checkout@v4
- name: Set up yazi
run: |
# Install yazi
test -d _yazi || {
mkdir -p _yazi
wget "https://github.com/sxyazi/yazi/releases/download/v0.2.5/yazi-x86_64-unknown-linux-gnu.zip" --output-document yazi.zip
unzip yazi.zip -d _yazi
}
echo "Current _yazi/ contents"
ls -R _yazi
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
echo "${PWD}/_yazi/yazi-x86_64-unknown-linux-gnu/" >> $GITHUB_PATH
- name: Run tests
uses: nvim-neorocks/nvim-busted-action@v1
with:
nvim_version: ${{ matrix.neovim_version }}
luarocks_version: "3.11.1"
# Install npm dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6.1.0
with:
command: npm run cy:run
- uses: actions/upload-artifact@v4
# add the line below to store screenshots only on failures
# if: failure()
if: failure()
with:
name: cypress-screenshots
path: integration-tests/cypress/screenshots
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`