From 9801c76841622b4a0524c844b45cf1a1076807b9 Mon Sep 17 00:00:00 2001 From: Slavo Vojacek Date: Mon, 14 Mar 2022 12:18:24 +0000 Subject: [PATCH] fix: ci test flows (#2) * fix: ci test flows * ci: same scripts for test Co-authored-by: Slavo Vojacek --- .github/workflows/semantic-release.yml | 1 + .github/workflows/test.yml | 8 ++++---- package.json | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index fdd3c72..805c117 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -32,6 +32,7 @@ jobs: - name: Run semantic release run: | npm ci + npm run build npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dabf6c0..52092e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,10 +25,10 @@ jobs: - name: Check format, lint and build from source run: | - npm ci + npm ci --ignore-scripts npm run format:check npm run lint:check - npm run build + npx tsc # TODO: add test step test-lambda-functions: @@ -50,8 +50,8 @@ jobs: - name: Check format, lint and build from source working-directory: ./lambda-functions run: | - npm ci + npm ci --ignore-scripts npm run format:check npm run lint:check - npm run build + npx tsc # TODO: add test step diff --git a/package.json b/package.json index 578e703..a05bffc 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,9 @@ "!dist/*.tsbuildinfo" ], "scripts": { - "build": "tsc", - "prepack": "tsc; cd lambda-functions; npm ci; npm run build; cp -r dist ../dist/constructs/lambda/assets", + "postinstall": "cd lambda-functions; npm ci", + "build": "tsc; cd lambda-functions; npm run build", + "postbuild": "cp -r lambda-functions/dist dist/constructs/lambda/assets", "test": "jest", "format": "prettier --write '{.github,lib,test}/**' '*.json'", "format:check": "prettier --check '{.github,lib,test}/**' '*.json'",