Skip to content

Commit 23043ef

Browse files
authored
Merge pull request #97 from imagekit-developer/dev
Dev
2 parents b4dd0d0 + e113327 commit 23043ef

Some content is hidden

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

71 files changed

+3165
-11978
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.babelrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"presets": [
33
"@babel/preset-react",
4-
"@babel/preset-env"
4+
"@babel/preset-env",
5+
"@babel/preset-typescript"
6+
],
7+
"plugins": [
8+
"transform-class-properties"
59
]
610
}

.github/workflows/nodejs.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Node CI
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:
@@ -43,22 +43,48 @@ jobs:
4343
with:
4444
node-version: ${{ matrix.node-version }}
4545

46-
- name: Setup module and build test-app
46+
- name: Setup module
4747
run: |
4848
npm install
4949
npm run build
50+
npm pack
51+
- name: build test-app
52+
run: |
5053
cd tests/test-app
5154
echo REACT_APP_URL_ENDPOINT = ${{ secrets.ik_url_endopint }} > .env;
55+
echo REACT_APP_PUBLIC_KEY = ${{ secrets.ik_public_key }} >> .env;
56+
echo REACT_APP_PRIVATE_KEY = ${{ secrets.ik_private_key }} >> .env;
57+
echo REACT_APP_AUTHENTICATION_ENDPOINT = 'http://localhost:4001/auth' >> .env;
58+
npm install && npm install ../../imagekitio*.tgz --force && npm run build
59+
cd server
5260
npm install
53-
npm run build
61+
env:
62+
CI: true
63+
REACT_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
64+
REACT_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
65+
REACT_APP_URL_ENDPOINT: ${{ secrets.ik_url_endopint }}
5466

5567
- name: Run E2E tests
56-
uses: cypress-io/github-action@v2
68+
uses: cypress-io/github-action@v4
5769
with:
5870
start: npm run serve:test-app
59-
wait-on: http://localhost:4000
71+
wait-on: 'http://localhost:4000, http://localhost:4001'
6072
env:
73+
DEBUG: 'cypress:server:browsers:electron'
6174
CI: true
6275
REACT_APP_PUBLIC_KEY: ${{ secrets.ik_public_key }}
6376
REACT_APP_PRIVATE_KEY: ${{ secrets.ik_private_key }}
6477
REACT_APP_URL_ENDPOINT: ${{ secrets.ik_url_endopint }}
78+
REACT_APP_AUTHENTICATION_ENDPOINT: 'http://localhost:4001/auth'
79+
80+
- name: tar workspace
81+
if: always()
82+
run: |
83+
tar -cf build.tar --exclude=./build.tar .
84+
- name: Archive build details
85+
if: always()
86+
uses: actions/upload-artifact@v3
87+
with:
88+
name: e2e-archive
89+
path: build.tar
90+
retention-days: 1

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
node_modules
2+
.DS_Store
23
.env
34
.vscode
45
lib
56
dist
67
coverage
7-
*/.DS_Store
8-
*/*/.DS_Store
8+
.DS_Store

README.md

Lines changed: 170 additions & 28 deletions
Large diffs are not rendered by default.

cypress.config.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
fixturesFolder: 'tests/cypress/fixtures',
5+
screenshotsFolder: 'tests/cypress/screenshots',
6+
videosFolder: 'tests/cypress/videos',
7+
env: {
8+
APP_HOST: 'http://localhost:4000/',
9+
},
10+
e2e: {
11+
// We've imported your old cypress plugins here.
12+
// You may want to clean this up later by importing these.
13+
setupNodeEvents(on, config) {
14+
return require('./tests/cypress/plugins/index.js')(on, config)
15+
},
16+
specPattern: 'tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
17+
supportFile: 'tests/cypress/support/index.js',
18+
},
19+
})

cypress.json

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

0 commit comments

Comments
 (0)