Skip to content

Remove goto from render_details for StyLua compatibility. #3305

Remove goto from render_details for StyLua compatibility.

Remove goto from render_details for StyLua compatibility. #3305

Workflow file for this run

name: Tests
on:
push:
branches-ignore:
- "benchmark*"
- "wip*"
tags:
- "v*"
pull_request:
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ci:
name: Test (${{ matrix.os }}, ${{ matrix.nvim-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
nvim-version:
- v0.11.5 # MIN_SUPPORTED_NVIM
- stable
- nightly
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Neovim
uses: rhysd/action-setup-vim@febef33995d6649302e9d88dda81e071b68f16a7
with:
neovim: true
version: ${{ matrix.nvim-version }}
- name: Install libresvg (macOS)
if: runner.os == 'macOS'
run: |
brew install resvg
echo "DYLD_LIBRARY_PATH=$(brew --prefix)/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" >> "$GITHUB_ENV"
- name: Cache libresvg (Linux)
if: runner.os == 'Linux'
id: cache-resvg
# zizmor: ignore[cache-poisoning] -- lookup-only, no cache writes
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: /usr/local/lib/libresvg.so
key: libresvg-linux-v0.47.0
lookup-only: true
- name: Build libresvg (Linux)
if: runner.os == 'Linux' && steps.cache-resvg.outputs.cache-hit != 'true'
run: |
curl -sL https://github.com/linebender/resvg/archive/refs/tags/v0.47.0.tar.gz | tar xz -C /tmp
cargo build --release -p resvg-capi --manifest-path /tmp/resvg-0.47.0/Cargo.toml
sudo cp /tmp/resvg-0.47.0/target/release/libresvg.so /usr/local/lib/
- name: Update ldconfig (Linux)
if: runner.os == 'Linux'
run: sudo ldconfig
- uses: Julian/setup-lean@c93774d9180849a5b6c4034c3c63d4544bdd943c
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Run tests
run: just test
env:
LEAN_TEST_TIMEOUT: 60000
release:
name: Release
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
needs: ci
runs-on: ubuntu-latest
environment: release
permissions:
attestations: write # for sigstore attestation
contents: write # for creating the GitHub release
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Upload to LuaRocks
uses: nvim-neorocks/luarocks-tag-release@adbca66e871a519055f4917c6af5fbf19f656f5d
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
- name: Create a GitHub Release
run: gh release create "${GITHUB_REF_NAME}" --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}