Skip to content

Commit 19a9ab4

Browse files
authored
Merge pull request #99 from imagekit-developer/SDK-57
Sdk 57
2 parents 5ded76b + 298f7a6 commit 19a9ab4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+53396
-16723
lines changed

.eslintrc.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/nodejs.yml

Lines changed: 73 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,92 @@
1-
name: Node CI
1+
name: Vue 3 CI/CD
22

33
on: [push, workflow_dispatch]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
98

109
strategy:
1110
matrix:
12-
node-version: [14.x]
11+
node-version: [16.x]
1312

1413
steps:
15-
- uses: actions/checkout@v1
16-
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: ${{ matrix.node-version }}
20-
- name: npm install, build, and test
21-
run: |
22-
npm install
23-
npm run test:unit
24-
env:
25-
CI: true
26-
VUE_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
27-
VUE_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
28-
VUE_APP_URL_ENDPOINT: ${{ secrets.ik_url_endpoint }}
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Build and test
26+
run: |
27+
npm run build
28+
29+
- name: Upload coverage to Codecov
30+
uses: codecov/codecov-action@v1
31+
with:
32+
token: ${{ secrets.CODECOV_TOKEN }}
33+
file: ./coverage/lcov.info
34+
flags: unittests
35+
36+
env:
37+
CI: true
38+
VUE_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
39+
VUE_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
40+
VUE_APP_URL_ENDPOINT: ${{ secrets.ik_url_endpoint }}
2941

3042
e2e:
3143
runs-on: ubuntu-latest
3244

3345
strategy:
3446
matrix:
35-
node-version: [14.x]
47+
node-version: [16.x]
3648

3749
steps:
38-
- uses: actions/checkout@v1
39-
40-
- name: Use Node.js ${{ matrix.node-version }}
41-
uses: actions/setup-node@v1
42-
with:
43-
node-version: ${{ matrix.node-version }}
44-
45-
- name: Setup module and build sample-app
46-
run: |
47-
npm install
48-
cd samples/sample-app
49-
echo VUE_APP_URL_ENDPOINT = ${{ secrets.ik_url_endpoint }} > .env;
50-
npm install
51-
npm run build
52-
53-
- name: Run E2E tests
54-
uses: cypress-io/github-action@v2
55-
with:
56-
start: npm run start:sample
57-
wait-on: http://localhost:3000
58-
env:
59-
CI: true
60-
VUE_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
61-
VUE_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
62-
VUE_APP_URL_ENDPOINT: ${{ secrets.ik_url_endpoint }}
50+
- name: Checkout code
51+
uses: actions/checkout@v2
52+
53+
- name: Use Node.js ${{ matrix.node-version }}
54+
uses: actions/setup-node@v2
55+
with:
56+
node-version: ${{ matrix.node-version }}
57+
58+
- name: Install dependencies
59+
run: |
60+
npm install
61+
npm run build
62+
63+
- name: Build Test app
64+
run: |
65+
cd tests/test-app
66+
echo VUE_APP_URL_ENDPOINT = ${{ secrets.ik_url_endpoint }} > .env;
67+
echo VUE_APP_PUBLIC_KEY = ${{ secrets.ik_public_key }} >> .env;
68+
echo VUE_APP_AUTHENTICATION_ENDPOINT = 'http://localhost:3001/auth' >> .env;
69+
npm install
70+
npm run build
71+
cd server
72+
echo VUE_APP_PRIVATE_KEY = ${{ secrets.ik_private_key }} > .env;
73+
npm install
74+
75+
- name: Start the app for Cypress
76+
run: |
77+
npm run start:test-app > /dev/null 2>&1 &
78+
echo "App started successfully"
79+
npx wait-on http://localhost:3000
80+
echo "App is ready"
81+
82+
- name: Run E2E tests
83+
uses: cypress-io/github-action@v4
84+
with:
85+
wait-on: http://localhost:3000
86+
env:
87+
DEBUG: 'cypress:server:browsers:electron'
88+
CI: true
89+
VUE_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
90+
VUE_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
91+
VUE_APP_URL_ENDPOINT: ${{ secrets.ik_url_endpoint }}
92+
VUE_APP_AUTHENTICATION_ENDPOINT: http://localhost:3001/auth

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
node-version: [10.x, 12.x]
13+
node-version: [16.x]
1414

1515
steps:
1616
- uses: actions/checkout@v1
@@ -21,7 +21,6 @@ jobs:
2121
- name: npm install, build, and test
2222
run: |
2323
npm i
24-
npm run test:unit
2524
npm run build
2625
env:
2726
CI: true

.jest/register-context.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

.storybook/addons.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

.storybook/config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)