Skip to content

Commit 6068f4c

Browse files
committed
ci: set different stages for test
1 parent f139116 commit 6068f4c

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed

.github/workflows/nodejs.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414

1515
jobs:
1616
send_docker_image_to_hub:
17-
needs: [build]
17+
needs: [build, test]
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
@@ -63,17 +63,6 @@ jobs:
6363
run: |
6464
npm run vscode:prepublish --workspace=vscode
6565
66-
- name: npm test
67-
if: github.ref != 'refs/heads/main'
68-
run: |
69-
npm run test
70-
71-
- name: npm coverage
72-
if: github.ref == 'refs/heads/main'
73-
#npm run coveralls --workspace=vscode
74-
run: |
75-
npm run test
76-
7766
- name: npm package standalone extension
7867
if: github.ref == 'refs/heads/main'
7968
run: |
@@ -87,3 +76,32 @@ jobs:
8776
name: smelly-test-vscode-extension
8877
path: ./vscode/*.vsix
8978

79+
test:
80+
runs-on: ubuntu-latest
81+
needs: [build]
82+
steps:
83+
- uses: actions/checkout@v4
84+
- name: Set Environment Variables
85+
uses: tw3lveparsecs/[email protected]
86+
with:
87+
envFilePath: ./envvars.for.actions
88+
89+
- name: Use Node.js
90+
uses: actions/setup-node@v4
91+
with:
92+
node-version: ${{ env.NODE_VERSION }}
93+
94+
- name: Load & Cache Dependencies
95+
uses: ./.github/actions/cached-deps
96+
97+
- name: npm test
98+
if: github.ref != 'refs/heads/main'
99+
run: |
100+
npm run test
101+
102+
- name: npm coverage
103+
if: github.ref == 'refs/heads/main'
104+
#npm run coveralls --workspace=vscode
105+
run: |
106+
npm run test
107+

0 commit comments

Comments
 (0)