Skip to content

Commit 7e41139

Browse files
authored
Merge pull request #552 from di-sukharev/improve_tests
Improve CLI test coverage and harden proxy configuration behavior
2 parents 7fa2384 + 66a8c2b commit 7e41139

37 files changed

+3918
-2777
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,40 @@ on:
88
- main
99

1010
jobs:
11-
unit-test:
11+
linux-tests:
1212
runs-on: ubuntu-latest
13-
strategy:
14-
matrix:
15-
node-version: [20.x]
1613
steps:
1714
- uses: actions/checkout@v4
18-
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v3
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
2017
with:
21-
node-version: ${{ matrix.node-version }}
18+
node-version: '20.x'
2219
cache: 'npm'
20+
- name: Setup git
21+
run: |
22+
git config --global user.email "test@example.com"
23+
git config --global user.name "Test User"
2324
- name: Install dependencies
24-
run: npm install
25+
run: npm ci
2526
- name: Run Unit Tests
2627
run: npm run test:unit
27-
e2e-test:
28-
runs-on: ubuntu-latest
29-
strategy:
30-
matrix:
31-
node-version: [20.x]
28+
- name: Run Core E2E Tests
29+
run: npm run test:e2e:core
30+
- name: Run Prompt Module E2E Tests
31+
run: npm run test:e2e:prompt-module
32+
macos-smoke:
33+
runs-on: macos-latest
3234
steps:
3335
- uses: actions/checkout@v4
34-
- name: Use Node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@v3
36+
- name: Use Node.js
37+
uses: actions/setup-node@v4
3638
with:
37-
node-version: ${{ matrix.node-version }}
39+
node-version: '20.x'
3840
cache: 'npm'
39-
- name: Install git
40-
run: |
41-
sudo apt-get update
42-
sudo apt-get install -y git
43-
git --version
44-
- name: Setup git
45-
run: |
46-
git config --global user.email "test@example.com"
47-
git config --global user.name "Test User"
4841
- name: Install dependencies
49-
run: npm install
50-
- name: Build
51-
run: npm run build
52-
- name: Run E2E Tests
53-
run: npm run test:e2e
42+
run: npm ci
43+
- name: Run Smoke E2E Tests
44+
run: npm run test:e2e:smoke
5445
prettier:
5546
runs-on: ubuntu-latest
5647
steps:

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,13 @@ If you are behind a proxy, you can set it in the config:
245245
oco config set OCO_PROXY=http://127.0.0.1:7890
246246
```
247247

248-
Or it will automatically use `HTTPS_PROXY` or `HTTP_PROXY` environment variables.
248+
If `OCO_PROXY` is unset, OpenCommit will automatically use `HTTPS_PROXY` or `HTTP_PROXY` environment variables.
249+
250+
To explicitly disable proxy use for OpenCommit, even when those environment variables are set:
251+
252+
```sh
253+
oco config set OCO_PROXY=null
254+
```
249255

250256
### Locale configuration
251257

0 commit comments

Comments
 (0)