add nvim_bench.yml #10
Workflow file for this run
This file contains 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: 'Neovim Benchmark' | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
pages: write | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: '[Setup > repo] Checkout' | |
uses: actions/checkout@v3 | |
- name: '[Setup > vim-startuptime] Download' | |
run: wget https://github.com/rhysd/vim-startuptime/releases/download/v1.3.1/vim-startuptime_1.3.1_linux_amd64.tar.gz | |
- name: '[Setup > vim-startuptime] Extract' | |
run: tar -xvf vim-startuptime_1.3.1_linux_amd64.tar.gz | |
- name: '[Setup > vim-startuptime] Install' | |
run: | | |
mv vim-startuptime /usr/local/bin/vim-startuptime | |
chmod +x /usr/local/bin/vim-startuptime | |
- name: '[Setup > Neovim]' | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
- name: '[Setup > Neovim] Install config' | |
run: ./dotfiles install neovim | |
- name: '[Setup > Neovim] Install plugins' | |
run: nvim --headless -c 'Lazy! restore' -c 'qall' | |
- name: '[Benchmark]' | |
run: vim-startuptime -vimpath nvim | tee ../result.txt | |
env: | |
TERM: screen-256color | |
- name: '[Benchmark] Parse result' | |
run: python .github/scripts/vim_startuptime_to_json.py -i ../result.txt -o ./pages/benchmarks.json -b ${GITHUB_REF##*/} | |
- name: '[Benchmark] Commit' | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'doc: update benchmarks.json [skip ci]' | |
file_pattern: './pages' | |
- name: '[Pages] Setup' | |
uses: actions/configure-pages@v3 | |
- name: '[Pages] Upload' | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: './pages' | |
- name: '[Pages] Deploy' | |
id: deployment | |
uses: actions/deploy-pages@v2 |