Skip to content

Commit de41e13

Browse files
Make work flow files more readable
1 parent 7a10400 commit de41e13

File tree

5 files changed

+156
-46
lines changed

5 files changed

+156
-46
lines changed

.github/workflows/deploy.yaml

Lines changed: 52 additions & 15 deletions
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 27 additions & 8 deletions
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
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup python
2126
- 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

Lines changed: 12 additions & 4 deletions
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

Lines changed: 61 additions & 18 deletions
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
# FIXME: https://github.com/cursorless-dev/cursorless/issues/2793
@@ -32,48 +34,86 @@ jobs:
3234
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
3335
TEMP_DIR: ${{ github.workspace }}/temp
3436
NODE_OPTIONS: "--max-old-space-size=4096"
37+
3538
steps:
36-
- uses: actions/checkout@v4
37-
- run: corepack enable
38-
- uses: actions/setup-node@v4
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
- name: Enable Corepack
43+
run: corepack enable
44+
45+
- name: Set up Node.js
46+
uses: actions/setup-node@v4
3947
with:
4048
node-version-file: .nvmrc
4149
cache: pnpm
42-
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
50+
51+
- name: Creating log directories
52+
run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
4353
shell: bash
44-
- run: pnpm --color install
45-
- run: pnpm --color compile
46-
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
47-
- run: xvfb-run -a pnpm --color test
54+
55+
- name: Install dependencies
56+
run: pnpm --color install
57+
58+
- name: Compile
59+
run: pnpm --color compile
60+
61+
- name: Build
62+
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
63+
64+
- name: Run tests (Linux)
65+
run: xvfb-run -a pnpm --color test
4866
if: runner.os == 'Linux'
49-
- run: pnpm --color test
67+
68+
- name: Run tests (Other)
69+
run: pnpm --color test
5070
if: runner.os != 'Linux'
51-
- run: xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
71+
72+
- name: Run Talon-JS tests (Linux)
73+
run: xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
5274
if: runner.os == 'Linux' && matrix.app_version == 'stable'
53-
- run: pnpm -F @cursorless/test-harness test:talonJs
75+
76+
- name: Run Talon-JS tests (Other)
77+
run: pnpm -F @cursorless/test-harness test:talonJs
5478
if: runner.os != 'Linux' && matrix.app_version == 'stable'
55-
- run: xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
79+
80+
- name: Run Cursorless-everywhere-talon tests (Linux)
81+
run: xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
5682
if: runner.os == 'Linux' && matrix.app_version == 'stable'
57-
- run: pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
83+
84+
- name: Run Cursorless-everywhere-talon tests (Other)
85+
run: pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
5886
if: runner.os != 'Linux' && matrix.app_version == 'stable'
59-
- run: bash -x scripts/install-neovim-dependencies.sh
60-
- uses: rhysd/action-setup-vim@v1
87+
88+
- name: Install neovim dependencies
89+
run: bash -x scripts/install-neovim-dependencies.sh
90+
91+
-name: Setup neovim (Linux)
92+
uses: rhysd/action-setup-vim@v1
6193
id: vim
94+
if: runner.os == 'Linux' && matrix.app_version == 'stable'
6295
with:
6396
version: ${{ env.NEOVIM_VERSION }}
6497
neovim: true
65-
- name: Run neovim tests
98+
99+
- name: Run neovim tests (Linux)
66100
run: xvfb-run -a pnpm -F @cursorless/test-harness test:neovim
67-
if: runner.os == 'Linux'
101+
if: runner.os == 'Linux' && matrix.app_version == 'stable'
68102
env:
69103
NEOVIM_PATH: ${{ steps.vim.outputs.executable }}
70-
- uses: ./.github/actions/test-neovim-lua/
104+
105+
- name: Run neovim lua tests (Linux)
106+
uses: ./.github/actions/test-neovim-lua/
71107
if: runner.os == 'Linux' && matrix.app_version == 'stable'
108+
109+
- name: Run neovim lua lint (Linux)
72110
- uses: ./.github/actions/lint-lua-ls/
73111
if: runner.os == 'Linux' && matrix.app_version == 'stable'
112+
74113
- name: Create vscode dist that can be installed locally
75114
run: pnpm -F @cursorless/cursorless-vscode populate-dist --local-install
76115
if: runner.os == 'Linux' && matrix.app_version == 'stable'
116+
77117
- name: Test create vsix
78118
id: createVsix
79119
uses: HaaLeo/publish-vscode-extension@v1
@@ -83,18 +123,21 @@ jobs:
83123
dryRun: true
84124
- run: mv ${{ steps.createVsix.outputs.vsixPath }} cursorless-development.vsix
85125
if: runner.os == 'Linux' && matrix.app_version == 'stable'
126+
86127
- name: Upload vsix
87128
uses: actions/upload-artifact@v4
88129
if: runner.os == 'Linux' && matrix.app_version == 'stable'
89130
with:
90131
name: vsix
91132
path: cursorless-development.vsix
133+
92134
- name: Archive logs
93135
uses: actions/upload-artifact@v4
94136
with:
95137
name: logs
96138
path: ${{ env.VSCODE_LOGS_DIR }}
97139
if: failure()
140+
98141
- name: Archive dumps
99142
uses: actions/upload-artifact@v4
100143
with:

0 commit comments

Comments
 (0)