diff options
author | James McCoy <jamessan@jamessan.com> | 2021-12-31 11:13:23 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2021-12-31 12:09:23 -0500 |
commit | 35034da779c54304dfb6aac2b6f080e23ad81fd9 (patch) | |
tree | 8b000a3e7ea54dcb7a0b49cfb72217da90385c7e | |
parent | fc62fdd42fde37949af3c6b6273acc1c116cb6f0 (diff) | |
download | rneovim-35034da779c54304dfb6aac2b6f080e23ad81fd9.tar.gz rneovim-35034da779c54304dfb6aac2b6f080e23ad81fd9.tar.bz2 rneovim-35034da779c54304dfb6aac2b6f080e23ad81fd9.zip |
ci: run lint only on master branch
The list of known lint issues is only updated for the master branch, so
other branches report lots of false positive issues.
-rw-r--r-- | .github/workflows/ci.yml | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a67a44407b..a7d34e06e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,45 @@ concurrency: cancel-in-progress: true jobs: + lint: + if: (github.event_name == 'pull_request' && github.base_ref == 'master' && !github.event.pull_request.draft) || (github.event_name == 'push' && github.ref == 'refs/heads/master') + runs-on: ubuntu-20.04 + env: + CC: gcc + steps: + - uses: actions/checkout@v2 + + - name: Setup common environment variables + run: ./.github/workflows/env.sh lint + + - name: Install apt packages + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip + + - name: Setup interpreter packages + run: | + ./ci/before_install.sh + ./ci/install.sh + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ${{ env.CACHE_NVIM_DEPS_DIR }} + ~/.ccache + key: ${{ matrix.runner }}-lint-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'third-party/**', '**/CMakeLists.txt') }}-${{ github.base_ref }} + + - name: Build third-party + run: ./ci/before_script.sh + + - name: Run lint + run: ./ci/script.sh + + - name: Cache dependencies + if: ${{ success() }} + run: ./ci/before_cache.sh + unixish: name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) strategy: @@ -26,10 +65,6 @@ jobs: cc: clang-12 runner: ubuntu-20.04 os: linux - - flavor: lint - cc: gcc - runner: ubuntu-20.04 - os: linux - flavor: tsan cc: clang-12 runner: ubuntu-20.04 |