Skip to content

Commit f79e0fe

Browse files
fix: separate test step from Dockerfile (#190)
1 parent 6c993d7 commit f79e0fe

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.github/workflows/plugin-deploy.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,32 @@ jobs:
3030
ct_tf_secret: ${{ secrets.CT_TF_SECRET }}
3131
klaviyo_auth_key: ${{ secrets.KLAVIYO_AUTH_KEY }}
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
build_test:
34+
name: 'Build and test'
35+
runs-on: ubuntu-latest
36+
needs: [ infrastructure ]
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v3
40+
- name: Use Node.js ${{ matrix.node-version }}
41+
uses: actions/setup-node@v3
42+
with:
43+
node-version: 18.x
44+
cache: yarn
45+
cache-dependency-path: ./plugin/yarn.lock
46+
- name: Dependencies install
47+
working-directory: ./plugin
48+
run: yarn install --frozen-lockfile
49+
- name: Linting
50+
working-directory: ./plugin
51+
run: yarn lint
52+
- name: Test
53+
working-directory: ./plugin
54+
run: yarn test
3355
docker_image:
3456
name: "Build and push docker image"
3557
runs-on: ubuntu-latest
36-
needs: [ infrastructure ]
58+
needs: [ build_test ]
3759
steps:
3860
- name: Checkout
3961
uses: actions/checkout@v3

plugin/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ COPY package.json yarn.lock ./
66
# install dependencies
77
RUN yarn --frozen-lockfile
88
COPY . .
9-
RUN yarn test
109
RUN yarn build
1110
# remove development dependencies
1211
RUN yarn install --production --ignore-scripts --prefer-offline --force --frozen-lockfile

plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "klaviyo-ct-plugin",
3-
"version": "1.0.12",
3+
"version": "1.0.13",
44
"description": "Klaviyo plugin for integration with commercetools",
55
"main": "index.js",
66
"author": {

0 commit comments

Comments
 (0)