From adda751407df6d9fcb9f2cf1dade0c713924e20a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:55:34 +0100 Subject: ci: rename workflow files to be simpler and more consistent (#21253) --- .github/workflows/add-reviewers.yml | 18 ++++++++++ .github/workflows/codeql-analysis.yml | 42 ----------------------- .github/workflows/codeql.yml | 42 +++++++++++++++++++++++ .github/workflows/commitlint.yml | 23 ------------- .github/workflows/coverity-scan.yml | 44 ------------------------- .github/workflows/coverity.yml | 44 +++++++++++++++++++++++++ .github/workflows/lintcommit.yml | 23 +++++++++++++ .github/workflows/remove-reviewers-on-draft.yml | 17 ---------- .github/workflows/remove-reviewers.yml | 17 ++++++++++ .github/workflows/reviews.yml | 18 ---------- 10 files changed, 144 insertions(+), 144 deletions(-) create mode 100644 .github/workflows/add-reviewers.yml delete mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/commitlint.yml delete mode 100644 .github/workflows/coverity-scan.yml create mode 100644 .github/workflows/coverity.yml create mode 100644 .github/workflows/lintcommit.yml delete mode 100644 .github/workflows/remove-reviewers-on-draft.yml create mode 100644 .github/workflows/remove-reviewers.yml delete mode 100644 .github/workflows/reviews.yml diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml new file mode 100644 index 0000000000..6c8c7ff8ed --- /dev/null +++ b/.github/workflows/add-reviewers.yml @@ -0,0 +1,18 @@ +name: "Request reviews" +on: + pull_request_target: + types: [labeled, ready_for_review, reopened] +jobs: + request-reviewer: + if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v3 + - name: 'Request reviewers' + uses: actions/github-script@v6 + with: + script: | + const script = require('./.github/scripts/reviews.js') + await script({github, context}) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 6ba0d43fe0..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "CodeQL" - -on: - schedule: - - cron: '42 0 * * 0' - workflow_dispatch: -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'cpp' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Setup common environment variables - run: ./.github/workflows/env.sh - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y autoconf automake build-essential cmake cpanminus gcc-multilib gdb gettext language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip - - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - - - if: matrix.language == 'cpp' - run: make - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..6ba0d43fe0 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: "CodeQL" + +on: + schedule: + - cron: '42 0 * * 0' + workflow_dispatch: +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup common environment variables + run: ./.github/workflows/env.sh + + - name: Install apt packages + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake build-essential cmake cpanminus gcc-multilib gdb gettext language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - if: matrix.language == 'cpp' + run: make + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml deleted file mode 100644 index a7a227865d..0000000000 --- a/.github/workflows/commitlint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: "Commit Linter" -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - branches: - - 'master' -jobs: - lint-commits: - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha }} - path: pr_nvim - - uses: rhysd/action-setup-vim@v1 - with: - neovim: true - - run: wget https://raw.githubusercontent.com/neovim/neovim/master/scripts/lintcommit.lua - - run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=true})" diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml deleted file mode 100644 index ce7822b5c1..0000000000 --- a/.github/workflows/coverity-scan.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Coverity -on: - schedule: - - cron: '10 0 * * *' # Run every day at 00:10 - workflow_dispatch: - -jobs: - scan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip - - - name: Download Coverity - run: | - wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=neovim%2Fneovim" -O coverity_tool.tgz - mkdir cov-scan - tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan - env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - - - name: Build dependencies - run: make deps - - - name: Build/scan neovim - run: | - env PATH=$(pwd)/cov-scan/bin:$PATH cov-build --dir cov-int make - - - name: Submit results - run: | - tar zcf cov-scan.tgz cov-int - curl --form token=$TOKEN \ - --form email=$EMAIL \ - --form file=@cov-scan.tgz \ - --form version="$(git rev-parse HEAD)" \ - --form description="Weekly GHA scan" \ - 'https://scan.coverity.com/builds?project=neovim%2Fneovim' - env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml new file mode 100644 index 0000000000..ce7822b5c1 --- /dev/null +++ b/.github/workflows/coverity.yml @@ -0,0 +1,44 @@ +name: Coverity +on: + schedule: + - cron: '10 0 * * *' # Run every day at 00:10 + workflow_dispatch: + +jobs: + scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip + + - name: Download Coverity + run: | + wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=neovim%2Fneovim" -O coverity_tool.tgz + mkdir cov-scan + tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + + - name: Build dependencies + run: make deps + + - name: Build/scan neovim + run: | + env PATH=$(pwd)/cov-scan/bin:$PATH cov-build --dir cov-int make + + - name: Submit results + run: | + tar zcf cov-scan.tgz cov-int + curl --form token=$TOKEN \ + --form email=$EMAIL \ + --form file=@cov-scan.tgz \ + --form version="$(git rev-parse HEAD)" \ + --form description="Weekly GHA scan" \ + 'https://scan.coverity.com/builds?project=neovim%2Fneovim' + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml new file mode 100644 index 0000000000..a7a227865d --- /dev/null +++ b/.github/workflows/lintcommit.yml @@ -0,0 +1,23 @@ +name: "Commit Linter" +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + branches: + - 'master' +jobs: + lint-commits: + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + path: pr_nvim + - uses: rhysd/action-setup-vim@v1 + with: + neovim: true + - run: wget https://raw.githubusercontent.com/neovim/neovim/master/scripts/lintcommit.lua + - run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=true})" diff --git a/.github/workflows/remove-reviewers-on-draft.yml b/.github/workflows/remove-reviewers-on-draft.yml deleted file mode 100644 index f707f79737..0000000000 --- a/.github/workflows/remove-reviewers-on-draft.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Remove reviewers" -on: - pull_request_target: - types: [converted_to_draft, closed] -jobs: - remove-reviewers: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: actions/checkout@v3 - - name: 'Remove reviewers' - uses: actions/github-script@v6 - with: - script: | - const script = require('./.github/scripts/remove-reviewers.js') - await script({github, context}) diff --git a/.github/workflows/remove-reviewers.yml b/.github/workflows/remove-reviewers.yml new file mode 100644 index 0000000000..f707f79737 --- /dev/null +++ b/.github/workflows/remove-reviewers.yml @@ -0,0 +1,17 @@ +name: "Remove reviewers" +on: + pull_request_target: + types: [converted_to_draft, closed] +jobs: + remove-reviewers: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v3 + - name: 'Remove reviewers' + uses: actions/github-script@v6 + with: + script: | + const script = require('./.github/scripts/remove-reviewers.js') + await script({github, context}) diff --git a/.github/workflows/reviews.yml b/.github/workflows/reviews.yml deleted file mode 100644 index 6c8c7ff8ed..0000000000 --- a/.github/workflows/reviews.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Request reviews" -on: - pull_request_target: - types: [labeled, ready_for_review, reopened] -jobs: - request-reviewer: - if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: actions/checkout@v3 - - name: 'Request reviewers' - uses: actions/github-script@v6 - with: - script: | - const script = require('./.github/scripts/reviews.js') - await script({github, context}) -- cgit