ci: add note about permissions and repo settings for automerge #1342
Workflow file for this run
This file contains hidden or 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: Run tests | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# https://github.com/rhysd/action-setup-vim/blob/master/action.yml | |
neovim_version: ["nightly", "stable"] | |
steps: | |
- uses: actions/[email protected] | |
- uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
version: ${{ matrix.neovim_version }} | |
- uses: pnpm/[email protected] | |
- uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
cache: "pnpm" | |
- run: | | |
# install dependencies, which will also build the project | |
pnpm install | |
cd packages/integration-tests | |
# NVIM_APPNAME=nvim is the default, but spelled out here for clarity | |
NVIM_APPNAME=nvim pnpm tui neovim prepare | |
NVIM_APPNAME=nvim_alt pnpm tui neovim prepare | |
- name: Test that tui neovim exec works | |
run: | | |
# test that tui neovim exec works | |
pnpm tui neovim exec version | |
- run: pnpm test | |
# need to work around https://github.com/cypress-io/github-action/issues/1246 | |
- run: pnpm --filter integration-tests exec cypress install | |
- name: Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
command: | | |
pnpm tui run | |
- uses: actions/[email protected] | |
# add the line below to store screenshots only on failures | |
# if: failure() | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: integration-tests/cypress/screenshots | |
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn` | |
automerge: | |
needs: build | |
name: Automerge Dependabot PRs | |
runs-on: ubuntu-latest | |
permissions: | |
# NOTE: no special token needs to be generated if these permissions are | |
# used. However, "Workflow permissions > Allow GitHub Actions to create | |
# and approve pull requests" needs to be enabled | |
# https://github.com/fastify/github-action-merge-dependabot/issues/359 | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: fastify/[email protected] | |
with: | |
# https://github.com/fastify/github-action-merge-dependabot?tab=readme-ov-file | |
github-token: ${{ secrets.GITHUB_TOKEN }} |