From b35b410d54b1fa39d647fea98de66df1ae2b2524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20=E9=87=91=E5=8F=AF=E6=98=8E?= Date: Sun, 15 Oct 2023 15:21:08 +0200 Subject: [PATCH] chore(ci): re-enable all tests; ignore windows tests completely --- .github/workflows/tests.yml | 168 +++++++++++++++++------------------- scripts/run-vader-tests.sh | 2 +- 2 files changed, 82 insertions(+), 88 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9c02e769..4d44e0a4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,94 +9,93 @@ on: - '*' jobs: - # test_vim: - # name: Vim - # strategy: - # fail-fast: false - # matrix: - # os: [ubuntu-latest, macos-latest] - # vim-version: [v8.2.5172, v9.0.1500] - # runs-on: ${{ matrix.os }} - # steps: - # - name: Checkout kkoomen/vim-doge - # uses: actions/checkout@v2 - # - # - name: Checkout junegunn/vader.vim - # uses: actions/checkout@v2 - # with: - # repository: junegunn/vader.vim - # path: vader.vim - # - # - name: Cache Cargo dependencies - # uses: actions/cache@v2 - # with: - # path: ~/.cargo - # key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # - # - name: Build (unix) - # run: ./scripts/build.sh - # shell: bash - # - # - name: Setup vim - # uses: rhysd/action-setup-vim@v1 - # id: vim - # with: - # version: ${{ matrix.vim-version }} - # neovim: false - # - # - name: Run tests - # run: ./scripts/run-vader-tests.sh "${{ steps.vim.outputs.executable }}" - # shell: bash - # - # test_old_vim: - # name: Vim - # strategy: - # fail-fast: false - # matrix: - # os: [ubuntu-latest, macos-11] - # # Building older versions of Vim requires v8.2.1118 or less - # vim-version: [v7.4.2119, v8.2.1118] - # runs-on: ${{ matrix.os }} - # steps: - # - name: Checkout kkoomen/vim-doge - # uses: actions/checkout@v2 - # - # - name: Checkout junegunn/vader.vim - # uses: actions/checkout@v2 - # with: - # repository: junegunn/vader.vim - # path: vader.vim - # - # - name: Cache Cargo dependencies - # uses: actions/cache@v2 - # with: - # path: ~/.cargo - # key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # - # - name: Build (unix) - # run: ./scripts/build.sh - # shell: bash - # - # - name: Setup vim - # uses: rhysd/action-setup-vim@v1 - # id: vim - # with: - # version: ${{ matrix.vim-version }} - # neovim: false - # configure-args: | - # --with-features=huge --enable-fail-if-missing --disable-nls - # - # - name: Run tests - # run: ./scripts/run-vader-tests.sh "${{ steps.vim.outputs.executable }}" - # shell: bash + test_vim: + name: Vim + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + vim-version: [v8.2.5172, v9.0.1500] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout kkoomen/vim-doge + uses: actions/checkout@v2 + + - name: Checkout junegunn/vader.vim + uses: actions/checkout@v2 + with: + repository: junegunn/vader.vim + path: vader.vim + + - name: Cache Cargo dependencies + uses: actions/cache@v2 + with: + path: ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build (unix) + run: ./scripts/build.sh + shell: bash + + - name: Setup vim + uses: rhysd/action-setup-vim@v1 + id: vim + with: + version: ${{ matrix.vim-version }} + neovim: false + + - name: Run tests + run: ./scripts/run-vader-tests.sh "${{ steps.vim.outputs.executable }}" + shell: bash + + test_old_vim: + name: Vim + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-11] + # Building older versions of Vim requires v8.2.1118 or less + vim-version: [v7.4.2119, v8.2.1118] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout kkoomen/vim-doge + uses: actions/checkout@v2 + + - name: Checkout junegunn/vader.vim + uses: actions/checkout@v2 + with: + repository: junegunn/vader.vim + path: vader.vim + + - name: Cache Cargo dependencies + uses: actions/cache@v2 + with: + path: ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build (unix) + run: ./scripts/build.sh + shell: bash + + - name: Setup vim + uses: rhysd/action-setup-vim@v1 + id: vim + with: + version: ${{ matrix.vim-version }} + neovim: false + configure-args: | + --with-features=huge --enable-fail-if-missing --disable-nls + + - name: Run tests + run: ./scripts/run-vader-tests.sh "${{ steps.vim.outputs.executable }}" + shell: bash test_neovim: name: Neovim strategy: fail-fast: false matrix: - # os: [ubuntu-latest, macos-latest, windows-latest] - os: [windows-latest] + os: [ubuntu-latest, macos-latest] vim-version: [v0.3.2, stable] runs-on: ${{ matrix.os }} steps: @@ -116,14 +115,9 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Build (unix) - if: matrix.os != 'windows-latest' run: ./scripts/build.sh shell: bash - - name: Build (windows) - if: matrix.os == 'windows-latest' - run: ./scripts/build.ps1 - - name: Setup neovim uses: rhysd/action-setup-vim@v1 id: vim diff --git a/scripts/run-vader-tests.sh b/scripts/run-vader-tests.sh index fe456d7d..05e06777 100755 --- a/scripts/run-vader-tests.sh +++ b/scripts/run-vader-tests.sh @@ -8,7 +8,7 @@ set -u ROOT_DIR=$(cd "$(dirname "$0")/.."; pwd -P) vim="$1" -tests=${2:-"$(echo $ROOT_DIR/test/*.vader $ROOT_DIR/test/commands/*.vader $ROOT_DIR/test/options/*.vader $ROOT_DIR/test/filetypes/*/*.vader)"} +tests=${2:-"$ROOT_DIR/test/*.vader $ROOT_DIR/test/commands/*.vader $ROOT_DIR/test/options/*.vader $ROOT_DIR/test/filetypes/*/*.vader"} red='\033[0;31m' green='\033[0;32m'