Skip to content

Commit 1273b1c

Browse files
Make work flow files more readable (#2808)
<!-- Thanks for your change! * Remember to *add tests* if you have added a new feature, or fixed a bug. Use the test case recorder: https://www.cursorless.org/docs/contributing/test-case-recorder * Remember to *update the docs* if you've added a new feature. Link: https://github.com/cursorless-dev/cursorless/tree/main/docs * Remember to *test the cheatsheet manually* if you've added a new action, modifier, or scope -- or changed any Talon files. --> * Added name to each work flow step * Added padding between steps Fixes #2796 ## Release notes
1 parent 6606f98 commit 1273b1c

File tree

5 files changed

+161
-49
lines changed

5 files changed

+161
-49
lines changed

.github/workflows/deploy.yaml

+52-15
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,40 @@ jobs:
1313
environment: production
1414
env:
1515
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
16+
1617
steps:
17-
- uses: actions/checkout@v4
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
1820
with:
1921
fetch-depth: 0
20-
- run: corepack enable
21-
- uses: actions/setup-node@v4
22+
23+
- name: Enable Corepack
24+
run: corepack enable
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v4
2228
with:
2329
node-version-file: .nvmrc
2430
cache: pnpm
25-
- run: pnpm --color install
26-
- run: pnpm --color compile
27-
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
31+
32+
- name: Install dependencies
33+
run: pnpm --color install
34+
35+
- name: Compile
36+
run: pnpm --color compile
37+
38+
- name: Build
39+
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
2840
env:
2941
CURSORLESS_DEPLOY: true
42+
3043
- name: Publish to Open VSX Registry
3144
id: publishToOpenVSX
3245
uses: HaaLeo/publish-vscode-extension@v1
3346
with:
3447
pat: ${{ secrets.OPEN_VSX_TOKEN }}
3548
packagePath: packages/cursorless-vscode/dist
49+
3650
- name: Publish to Visual Studio Marketplace
3751
uses: HaaLeo/publish-vscode-extension@v1
3852
with:
@@ -47,36 +61,53 @@ jobs:
4761
env:
4862
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
4963
STAGING_DIRECTORY: ${{ github.workspace }}/cursorless.nvim-staging
64+
5065
steps:
51-
- uses: actions/checkout@v4
52-
- run: corepack enable
53-
- uses: actions/setup-node@v4
66+
- name: Checkout repository
67+
uses: actions/checkout@v4
68+
69+
- name: Enable Corepack
70+
run: corepack enable
71+
72+
- name: Set up Node.js
73+
uses: actions/setup-node@v4
5474
with:
5575
node-version-file: .nvmrc
5676
cache: pnpm
57-
- run: pnpm --color install
58-
- run: pnpm --color compile
59-
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
77+
78+
- name: Install dependencies
79+
run: pnpm --color install
80+
81+
- name: Compile
82+
run: pnpm --color compile
83+
84+
- name: Build
85+
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
6086
env:
6187
CURSORLESS_DEPLOY: true
62-
- uses: actions/checkout@v4
88+
89+
- name: Checkout cursorless.nvim plugin repo
90+
uses: actions/checkout@v4
6391
with:
6492
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
6593
repository: hands-free-vim/cursorless.nvim
6694
path: ${{ env.STAGING_DIRECTORY }}
95+
6796
- name: Configure GPG Key
6897
working-directory: ${{ env.STAGING_DIRECTORY }}
6998
run: |
7099
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
71100
env:
72101
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }}
102+
73103
- name: git config
74104
working-directory: ${{ env.STAGING_DIRECTORY }}
75105
run: |
76106
git config user.name cursorless-bot
77107
git config user.email [email protected]
78108
git config user.signingkey A9387720AFC62221
79109
git config commit.gpgsign true
110+
80111
- name: Push compiled files to cursorless.nvim plugin repo
81112
run: bash -x scripts/deploy-cursorless-nvim.sh ${{ env.STAGING_DIRECTORY }}
82113

@@ -85,20 +116,26 @@ jobs:
85116
runs-on: ubuntu-latest
86117
needs: publish-extension
87118
environment: production
119+
88120
steps:
89-
- uses: actions/checkout@v4
121+
- name: Checkout repository
122+
uses: actions/checkout@v4
90123
with:
91124
fetch-depth: 0
92125
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
126+
93127
- name: Configure GPG Key
94128
run: |
95129
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
96130
env:
97131
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }}
132+
98133
- name: git config
99134
run: |
100135
git config user.name cursorless-bot
101136
git config user.email [email protected]
102137
git config user.signingkey A9387720AFC62221
103138
git config commit.gpgsign true
104-
- run: bash -x scripts/deploy-cursorless-talon.sh
139+
140+
- name: Push cursorless-talon subrepo
141+
run: bash -x scripts/deploy-cursorless-talon.sh

.github/workflows/forbid-todo.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ on:
99
jobs:
1010
forbid-todo:
1111
runs-on: ubuntu-latest
12+
1213
steps:
13-
- uses: actions/checkout@v4
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
1417
- name: Forbid TODO
1518
run: ./scripts/forbid-todo.sh

.github/workflows/pre-commit.yml

+28-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Pre-commit
22
permissions: read-all
3+
34
on:
45
push:
56
branches:
@@ -16,19 +17,37 @@ jobs:
1617
runs-on: ubuntu-latest
1718
env:
1819
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
20+
1921
steps:
20-
- uses: actions/checkout@v4
21-
- uses: actions/setup-python@v5
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup python
26+
uses: actions/setup-python@v5
2227
with:
2328
python-version: 3.x
24-
- run: corepack enable
25-
- uses: actions/setup-node@v4
29+
30+
- name: Enable Corepack
31+
run: corepack enable
32+
33+
- name: Set up Node.js
34+
uses: actions/setup-node@v4
2635
with:
2736
node-version-file: .nvmrc
2837
cache: pnpm
29-
- run: pnpm --color install
30-
- uses: leafo/gh-actions-lua@v9
31-
- uses: leafo/gh-actions-luarocks@v4
32-
- uses: pre-commit/[email protected]
33-
- uses: pre-commit-ci/[email protected]
38+
39+
- name: Install dependencies
40+
run: pnpm --color install
41+
42+
- name: Install lua
43+
uses: leafo/gh-actions-lua@v9
44+
45+
- name: Install luarocks
46+
uses: leafo/gh-actions-luarocks@v4
47+
48+
- name: Run pre-commit hooks
49+
uses: pre-commit/[email protected]
50+
51+
- name: Auto-fix pre-commit issues
52+
uses: pre-commit-ci/[email protected]
3453
if: always()

.github/workflows/test-docs.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,19 @@ jobs:
1111
runs-on: ubuntu-latest
1212
env:
1313
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
14+
1415
steps:
15-
- uses: actions/checkout@v4
16-
- run: corepack enable
17-
- uses: actions/setup-node@v4
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Enable Corepack
20+
run: corepack enable
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v4
1824
with:
1925
node-version-file: .nvmrc
2026
cache: pnpm
21-
- run: bash -x scripts/build-and-assemble-website.sh
27+
28+
- name: Build website
29+
run: bash -x scripts/build-and-assemble-website.sh

.github/workflows/test.yml

+65-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Run Tests
22
permissions: read-all
3+
34
on:
45
push:
56
branches:
@@ -22,6 +23,7 @@ jobs:
2223
- os: ubuntu-latest
2324
app_version: legacy
2425
runs-on: ${{ matrix.os }}
26+
2527
env:
2628
APP_VERSION: ${{ matrix.app_version }}
2729
NEOVIM_VERSION: ${{ matrix.app_version == 'stable' && 'stable' || 'v0.10.0' }}
@@ -30,69 +32,112 @@ jobs:
3032
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
3133
TEMP_DIR: ${{ github.workspace }}/temp
3234
NODE_OPTIONS: "--max-old-space-size=4096"
35+
3336
steps:
34-
- uses: actions/checkout@v4
35-
- run: corepack enable
36-
- uses: actions/setup-node@v4
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
- name: Enable Corepack
41+
run: corepack enable
42+
43+
- name: Set up Node.js
44+
uses: actions/setup-node@v4
3745
with:
3846
node-version-file: .nvmrc
3947
cache: pnpm
40-
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
48+
49+
- name: Creating log directories
50+
run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
4151
shell: bash
42-
- run: pnpm --color install
43-
- run: pnpm --color compile
44-
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
45-
- run: xvfb-run -a pnpm --color test
52+
53+
- name: Install dependencies
54+
run: pnpm --color install
55+
56+
- name: Compile
57+
run: pnpm --color compile
58+
59+
- name: Build
60+
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
61+
62+
- name: Run tests (Linux)
63+
run: xvfb-run -a pnpm --color test
4664
if: runner.os == 'Linux'
47-
- run: pnpm --color test
65+
66+
- name: Run tests (Other)
67+
run: pnpm --color test
4868
if: runner.os != 'Linux'
49-
- run: xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
69+
70+
- name: Run Talon-JS tests (Linux)
71+
run: xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
5072
if: runner.os == 'Linux' && matrix.app_version == 'stable'
51-
- run: pnpm -F @cursorless/test-harness test:talonJs
73+
74+
- name: Run Talon-JS tests (Other)
75+
run: pnpm -F @cursorless/test-harness test:talonJs
5276
if: runner.os != 'Linux' && matrix.app_version == 'stable'
53-
- run: xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
77+
78+
- name: Run Cursorless-everywhere-talon tests (Linux)
79+
run: xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
5480
if: runner.os == 'Linux' && matrix.app_version == 'stable'
55-
- run: pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
81+
82+
- name: Run Cursorless-everywhere-talon tests (Other)
83+
run: pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
5684
if: runner.os != 'Linux' && matrix.app_version == 'stable'
57-
- run: bash -x scripts/install-neovim-dependencies.sh
58-
- uses: rhysd/action-setup-vim@v1
85+
86+
- name: Install neovim dependencies
87+
run: bash -x scripts/install-neovim-dependencies.sh
88+
89+
- name: Setup neovim (Linux)
90+
uses: rhysd/action-setup-vim@v1
5991
id: vim
92+
if: runner.os == 'Linux' && matrix.app_version == 'stable'
6093
with:
6194
version: ${{ env.NEOVIM_VERSION }}
6295
neovim: true
63-
- name: Run neovim tests
96+
97+
- name: Run neovim tests (Linux)
6498
run: xvfb-run -a pnpm -F @cursorless/test-harness test:neovim
65-
if: runner.os == 'Linux'
99+
if: runner.os == 'Linux' && matrix.app_version == 'stable'
66100
env:
67101
NEOVIM_PATH: ${{ steps.vim.outputs.executable }}
68-
- uses: ./.github/actions/test-neovim-lua/
102+
103+
- name: Run neovim lua tests (Linux)
104+
uses: ./.github/actions/test-neovim-lua/
69105
if: runner.os == 'Linux' && matrix.app_version == 'stable'
70-
- uses: ./.github/actions/lint-lua-ls/
106+
107+
- name: Run neovim lua lint (Linux)
108+
uses: ./.github/actions/lint-lua-ls/
71109
if: runner.os == 'Linux' && matrix.app_version == 'stable'
110+
72111
- name: Create vscode dist that can be installed locally
73112
run: pnpm -F @cursorless/cursorless-vscode populate-dist --local-install
74113
if: runner.os == 'Linux' && matrix.app_version == 'stable'
114+
75115
- name: Test create vsix
76116
id: createVsix
77117
uses: HaaLeo/publish-vscode-extension@v1
78118
with:
79119
pat: none
80120
packagePath: packages/cursorless-vscode/dist
81121
dryRun: true
82-
- run: mv ${{ steps.createVsix.outputs.vsixPath }} cursorless-development.vsix
122+
123+
- name: Rename vsix
124+
run: mv ${{ steps.createVsix.outputs.vsixPath }} cursorless-development.vsix
83125
if: runner.os == 'Linux' && matrix.app_version == 'stable'
126+
84127
- name: Upload vsix
85128
uses: actions/upload-artifact@v4
86129
if: runner.os == 'Linux' && matrix.app_version == 'stable'
87130
with:
88131
name: vsix
89132
path: cursorless-development.vsix
133+
90134
- name: Archive logs
91135
uses: actions/upload-artifact@v4
92136
with:
93137
name: logs
94138
path: ${{ env.VSCODE_LOGS_DIR }}
95139
if: failure()
140+
96141
- name: Archive dumps
97142
uses: actions/upload-artifact@v4
98143
with:

0 commit comments

Comments
 (0)