Skip to content

Commit c99b55b

Browse files
committed
split
1 parent 8c729ec commit c99b55b

2 files changed

Lines changed: 75 additions & 47 deletions

File tree

.github/workflows/test-cli.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Test CLI
2+
3+
on:
4+
merge_group:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- develop
9+
pull_request:
10+
types:
11+
- opened
12+
- synchronize
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
Test:
20+
timeout-minutes: 25
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout branch
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version-file: ".nvmrc"
30+
cache: 'npm'
31+
cache-dependency-path: package-lock.json
32+
33+
- name: Install packages
34+
run: npm ci
35+
36+
- name: Set Inso CLI variables
37+
id: inso-variables
38+
shell: bash
39+
run: |
40+
INSO_VERSION="$(jq .version packages/insomnia-inso/package.json -rj)-run.${{ github.run_number }}"
41+
PKG_NAME="inso-ubuntu-latest-$INSO_VERSION"
42+
echo "pkg-name=$PKG_NAME" >> $GITHUB_OUTPUT
43+
echo "inso-version=$INSO_VERSION" >> $GITHUB_OUTPUT
44+
45+
- name: Install node version of node-libcurl for inso tests
46+
run: node_modules/.bin/node-pre-gyp install --update-binary --directory node_modules/@getinsomnia/node-libcurl
47+
48+
- name : Build Inso
49+
run: npm run build -w insomnia-inso
50+
51+
- name: Run Inso bundle tests
52+
run: npm run test:bundle -w insomnia-inso
53+
54+
- name: Package Inso CLI binary
55+
run: npm run inso-package
56+
env:
57+
VERSION: ${{ steps.inso-variables.outputs.inso-version }}
58+
59+
- name: Run Inso binary tests
60+
run: npm run test:binary -w insomnia-inso
61+
62+
- name: Create Inso CLI artifacts
63+
run: npm run inso-package:artifacts
64+
env:
65+
VERSION: ${{ steps.inso-variables.outputs.inso-version }}
66+
67+
- name: Upload Inso CLI artifacts
68+
uses: actions/upload-artifact@v4
69+
with:
70+
if-no-files-found: ignore
71+
name: ${{ steps.inso-variables.outputs.pkg-name }}
72+
path: packages/insomnia-inso/artifacts

.github/workflows/test.yml

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Test App
22

33
on:
44
merge_group:
@@ -42,14 +42,8 @@ jobs:
4242
- name: Type checks
4343
run: npm run type-check
4444

45-
- name: Test Insomnia
46-
run: npm test -w packages/insomnia
47-
48-
- name: Test Inso
49-
run: npm test -w packages/insomnia-inso
50-
51-
- name: Test Insomnia Testing
52-
run: npm test -w packages/insomnia-testing
45+
- name: Unit Tests
46+
run: npm test
5347

5448
- name: Build app for smoke tests
5549
run: NODE_OPTIONS='--max_old_space_size=6144' npm run app-build
@@ -64,44 +58,6 @@ jobs:
6458
if: ${{ startsWith(github.head_ref, 'release/') }}
6559
run: npm run test:build -w packages/insomnia-smoke-test -- --project=Default
6660

67-
- name: Set Inso CLI variables
68-
id: inso-variables
69-
shell: bash
70-
run: |
71-
INSO_VERSION="$(jq .version packages/insomnia-inso/package.json -rj)-run.${{ github.run_number }}"
72-
PKG_NAME="inso-ubuntu-latest-$INSO_VERSION"
73-
echo "pkg-name=$PKG_NAME" >> $GITHUB_OUTPUT
74-
echo "inso-version=$INSO_VERSION" >> $GITHUB_OUTPUT
75-
76-
- name: Install node version of node-libcurl for inso tests
77-
run: node_modules/.bin/node-pre-gyp install --update-binary --directory node_modules/@getinsomnia/node-libcurl
78-
79-
- name : Build Inso
80-
run: npm run build -w insomnia-inso
81-
82-
- name: Run Inso bundle tests
83-
run: npm run test:bundle -w insomnia-inso
84-
85-
- name: Package Inso CLI binary
86-
run: npm run inso-package
87-
env:
88-
VERSION: ${{ steps.inso-variables.outputs.inso-version }}
89-
90-
- name: Run Inso binary tests
91-
run: npm run test:binary -w insomnia-inso
92-
93-
- name: Create Inso CLI artifacts
94-
run: npm run inso-package:artifacts
95-
env:
96-
VERSION: ${{ steps.inso-variables.outputs.inso-version }}
97-
98-
- name: Upload Inso CLI artifacts
99-
uses: actions/upload-artifact@v4
100-
with:
101-
if-no-files-found: ignore
102-
name: ${{ steps.inso-variables.outputs.pkg-name }}
103-
path: packages/insomnia-inso/artifacts
104-
10561
# This step should always run even when previous steps fail
10662
- name: Upload smoke test traces
10763
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)