Skip to content

Commit 60a63ae

Browse files
committed
chore(ci): add unit tests step to main workflow
1 parent 62c9bed commit 60a63ae

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,26 @@ jobs:
4040
docker-registry.bimdata.io/bimdata/${{ env.app }}:${{ github.sha }}
4141
docker-registry.bimdata.io/bimdata/${{ env.app }}:${{ env.tag }}
4242
43+
unit-tests:
44+
runs-on: [self-hosted, common]
45+
needs: build-and-push
46+
if: ${{ !contains(github.event.head_commit.message, '[skip unit]') }}
47+
steps:
48+
- uses: actions/checkout@v4
49+
with:
50+
ref: ${{ github.ref }}
51+
- uses: actions/setup-node@v4
52+
with:
53+
node-version: "20"
54+
- name: Run unit tests
55+
run: npm install && npm run test:unit
56+
4357
e2e-tests:
4458
runs-on: [self-hosted, testendtoend]
4559
needs: build-and-push
46-
if: |
47-
${{ !contains(github.event.head_commit.message, '[skip e2e]') }} &&
60+
if: ${{ !contains(github.event.head_commit.message, '[skip e2e]') &&
4861
github.ref != 'refs/heads/release' &&
49-
github.ref != 'refs/heads/master'
62+
github.ref != 'refs/heads/master' }}
5063
steps:
5164
- uses: actions/checkout@v4
5265
with:
@@ -65,7 +78,7 @@ jobs:
6578
ref: ${{ github.ref }}
6679
github_token: ${{ secrets.REPOS_TOKEN }}
6780
vault_passwd: ${{ secrets.VAULT_PASSWD }}
68-
cypress_version: 13.1.0
81+
cypress_version: 13.14.1
6982

7083
deploy:
7184
runs-on: [self-hosted, common]

0 commit comments

Comments
 (0)