From 8f9646a19f929ff2a451ce8991110edd3412eaab Mon Sep 17 00:00:00 2001 From: Prabir Shrestha Date: Sat, 17 Oct 2020 22:15:32 -0700 Subject: [PATCH] add github workflows for ci (#234) * add github workflows for chi * add .themisrc * add empty vimspec * add .vintrc.yaml --- .github/workflows/linux_neovim.yml | 44 +++++++++++++++++++++++ .github/workflows/linux_vim.yml | 46 ++++++++++++++++++++++++ .github/workflows/mac_neovim.yml | 44 +++++++++++++++++++++++ .github/workflows/reviewdog.yml | 22 ++++++++++++ .github/workflows/windows_neovim.yml | 46 ++++++++++++++++++++++++ .github/workflows/windows_vim.yml | 52 ++++++++++++++++++++++++++++ .vintrc.yaml | 10 ++++++ test/.themisrc | 3 ++ test/asyncomplete.vimspec | 2 ++ 9 files changed, 269 insertions(+) create mode 100644 .github/workflows/linux_neovim.yml create mode 100644 .github/workflows/linux_vim.yml create mode 100644 .github/workflows/mac_neovim.yml create mode 100644 .github/workflows/reviewdog.yml create mode 100644 .github/workflows/windows_neovim.yml create mode 100644 .github/workflows/windows_vim.yml create mode 100644 .vintrc.yaml create mode 100644 test/.themisrc create mode 100644 test/asyncomplete.vimspec diff --git a/.github/workflows/linux_neovim.yml b/.github/workflows/linux_neovim.yml new file mode 100644 index 0000000..6776b63 --- /dev/null +++ b/.github/workflows/linux_neovim.yml @@ -0,0 +1,44 @@ +name: linux_neovim + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + name: [neovim-v04-x64,neovim-nightly-x64] + include: + - name: neovim-v04-x64 + os: ubuntu-latest + neovim_version: v0.4.3 + - name: neovim-nightly-x64 + os: ubuntu-latest + neovim_version: nightly + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v1 + - name: Download neovim + shell: bash + run: | + mkdir -p ~/nvim/bin + curl -L https://github.com/neovim/neovim/releases/download/${{matrix.neovim_version}}/nvim.appimage -o ~/nvim/bin/nvim + chmod u+x ~/nvim/bin/nvim + - name: Download test runner + shell: bash + run: git clone --depth 1 --branch v1.5.4 --single-branch https://github.com/thinca/vim-themis ~/themis + - name: Run tests + shell: bash + run: | + export PATH=~/nvim/bin:$PATH + export PATH=~/themis/bin:$PATH + export THEMIS_VIM=nvim + nvim --version + themis --reporter spec diff --git a/.github/workflows/linux_vim.yml b/.github/workflows/linux_vim.yml new file mode 100644 index 0000000..1efbc93 --- /dev/null +++ b/.github/workflows/linux_vim.yml @@ -0,0 +1,46 @@ +name: linux_vim + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + name: [vim-v82-x64, vim-v81-x64] + include: + - name: vim-v82-x64 + os: ubuntu-latest + vim_version: 8.2.0813 + glibc_version: 2.15 + - name: vim-v81-x64 + os: ubuntu-latest + vim_version: 8.1.2414 + glibc_version: 2.15 + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v1 + - name: Download vim + shell: bash + run: | + mkdir -p ~/vim/bin + curl -L https://github.com/vim/vim-appimage/releases/download/v${{matrix.vim_version}}/GVim-v${{matrix.vim_version}}.glibc${{matrix.glibc_version}}-x86_64.AppImage -o ~/vim/bin/vim + chmod u+x ~/vim/bin/vim + - name: Download test runner + shell: bash + run: git clone --depth 1 --branch v1.5.4 --single-branch https://github.com/thinca/vim-themis ~/themis + - name: Run tests + shell: bash + run: | + export PATH=~/vim/bin:$PATH + export PATH=~/themis/bin:$PATH + export THEMIS_VIM=vim + vim --version + themis --reporter spec diff --git a/.github/workflows/mac_neovim.yml b/.github/workflows/mac_neovim.yml new file mode 100644 index 0000000..4964d24 --- /dev/null +++ b/.github/workflows/mac_neovim.yml @@ -0,0 +1,44 @@ +name: mac_neovim + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [macos-latest] + name: [neovim-v04-x64,neovim-nightly-x64] + include: + - name: neovim-v04-x64 + os: macos-latest + neovim_version: v0.4.3 + - name: neovim-nightly-x64 + os: macos-latest + neovim_version: nightly + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v1 + - name: Download neovim + shell: bash + run: curl -L https://github.com/neovim/neovim/releases/download/${{matrix.neovim_version}}/nvim-macos.tar.gz -o ~/nvim.tar.gz + - name: Extract neovim + shell: bash + run: tar xzf ~/nvim.tar.gz -C ~/ + - name: Download test runner + shell: bash + run: git clone --depth 1 --branch v1.5.4 --single-branch https://github.com/thinca/vim-themis ~/themis + - name: Run tests + shell: bash + run: | + export PATH=~/nvim-osx64/bin:$PATH + export PATH=~/themis/bin:$PATH + export THEMIS_VIM=nvim + nvim --version + themis --reporter spec diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000..f0752d5 --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,22 @@ +name: reviewdog + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + vimlint: + name: runner / vint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: vint + uses: reviewdog/action-vint@v1 + with: + github_token: ${{ secrets.github_token }} + level: error + reporter: github-pr-review diff --git a/.github/workflows/windows_neovim.yml b/.github/workflows/windows_neovim.yml new file mode 100644 index 0000000..a378a3d --- /dev/null +++ b/.github/workflows/windows_neovim.yml @@ -0,0 +1,46 @@ +name: windows_neovim + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [windows-latest] + name: [neovim-v04-x64,neovim-nightly-x64] + include: + - name: neovim-v04-x64 + os: windows-latest + neovim_version: v0.4.3 + neovim_arch: win64 + - name: neovim-nightly-x64 + os: windows-latest + neovim_version: nightly + neovim_arch: win64 + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v1 + - name: Download neovim + shell: PowerShell + run: Invoke-WebRequest -Uri https://github.com/neovim/neovim/releases/download/${{matrix.neovim_version}}/nvim-${{matrix.neovim_arch}}.zip -OutFile neovim.zip + - name: Extract neovim + shell: PowerShell + run: Expand-Archive -Path neovim.zip -DestinationPath $env:USERPROFILE + - name: Download test runner + shell: PowerShell + run: git clone --depth 1 --branch v1.5.4 --single-branch https://github.com/thinca/vim-themis $env:USERPROFILE\themis + - name: Run tests + shell: cmd + run: | + SET PATH=%USERPROFILE%\Neovim\bin;%PATH%; + SET PATH=%USERPROFILE%\themis\bin;%PATH%; + SET THEMIS_VIM=nvim + nvim --version + themis --reporter spec diff --git a/.github/workflows/windows_vim.yml b/.github/workflows/windows_vim.yml new file mode 100644 index 0000000..576ff6d --- /dev/null +++ b/.github/workflows/windows_vim.yml @@ -0,0 +1,52 @@ +name: windows_vim + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [windows-latest] + name: [vim-v82-x64, vim-v81-x64, vim-v80-x64] + include: + - name: vim-v82-x64 + os: windows-latest + vim_version: 8.2.0813 + vim_arch: x64 + vim_ver_path: vim82 + - name: vim-v81-x64 + os: windows-latest + vim_version: 8.1.2414 + vim_arch: x64 + vim_ver_path: vim81 + - name: vim-v80-x64 + os: windows-latest + vim_version: 8.0.1567 + vim_arch: x64 + vim_ver_path: vim80 + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v1 + - name: Download vim + shell: PowerShell + run: Invoke-WebRequest -Uri https://github.com/vim/vim-win32-installer/releases/download/v${{matrix.vim_version}}/gvim_${{matrix.vim_version}}_${{matrix.vim_arch}}.zip -OutFile vim.zip + - name: Extract vim + shell: PowerShell + run: Expand-Archive -Path vim.zip -DestinationPath $env:USERPROFILE + - name: Download test runner + shell: PowerShell + run: git clone --depth 1 --branch v1.5.4 --single-branch https://github.com/thinca/vim-themis $env:USERPROFILE\themis + - name: Run tests + shell: cmd + run: | + SET PATH=%USERPROFILE%\vim\${{matrix.vim_ver_path}};%PATH%; + SET PATH=%USERPROFILE%\themis\bin;%PATH%; + vim --version + themis --reporter spec diff --git a/.vintrc.yaml b/.vintrc.yaml new file mode 100644 index 0000000..c96daa0 --- /dev/null +++ b/.vintrc.yaml @@ -0,0 +1,10 @@ +cmdargs: + severity: style_problem + +policies: + ProhibitUnusedVariable: + enabled: false + ProhibitImplicitScopeVariable: + enabled: true + ProhibitNoAbortFunction: + enabled: true diff --git a/test/.themisrc b/test/.themisrc new file mode 100644 index 0000000..d73cbf9 --- /dev/null +++ b/test/.themisrc @@ -0,0 +1,3 @@ +set encoding=utf-8 +call themis#option('recursive', 1) +call themis#helper('command').with(themis#helper('assert')) diff --git a/test/asyncomplete.vimspec b/test/asyncomplete.vimspec new file mode 100644 index 0000000..eaf2b54 --- /dev/null +++ b/test/asyncomplete.vimspec @@ -0,0 +1,2 @@ +Describe asyncomplete +End