2828 PUBLIC_KEY : ${{ secrets.ik_public_key }}
2929 PRIVATE_KEY : ${{ secrets.ik_private_key }}
3030 URL_ENDPOINT : ${{ secrets.ik_url_endopint }}
31+ e2e :
32+ runs-on : ubuntu-latest
33+
34+ strategy :
35+ matrix :
36+ node-version : [14.x]
37+ steps :
38+ - uses : actions/checkout@v3
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 : Create e2e environment variables
46+ run : |
47+ cd sdk/src/environments
48+ echo export const environment = { > environment.ts;
49+ echo production: false, >> environment.ts;
50+ echo URL_ENDPOINT:\"https://ik.imagekit.io/sdktestingik\", >> environment.ts;
51+ echo PUBLIC_KEY:\"${{ secrets.ik_public_key }}\", >> environment.ts;
52+ echo AUTHENTICATION_ENDPOINT:\"http://localhost:3000/auth\" >> environment.ts;
53+ echo '};' >> environment.ts;
54+ less environment.ts
55+
56+ - name : Start client server
57+ run : |
58+ cd sdk
59+ npm install
60+ npm start &
61+ - name : Start auth server
62+ run : |
63+ cd samples/sample-server
64+ echo PRIVATE_KEY=${{ secrets.ik_private_key }} >> .env;
65+ npm install
66+ npm run server &
67+ env :
68+ CI : true
69+ PUBLIC_KEY : ${{ secrets.ik_public_key }}
70+ PRIVATE_KEY : ${{ secrets.ik_private_key }}
71+ URL_ENDPOINT : https://ik.imagekit.io/sdktestingik
72+ - name : Run E2E tests
73+ uses : cypress-io/github-action@v5
74+ with :
75+ install : false
76+ wait-on : ' http://localhost:4200'
77+ working-directory : sdk
78+ env :
79+ DEBUG : ' cypress:server:browsers:electron'
80+ CI : true
81+ PUBLIC_KEY : ${{ secrets.ik_public_key }}
82+ PRIVATE_KEY : ${{ secrets.ik_private_key }}
83+ URL_ENDPOINT : https://ik.imagekit.io/sdktestingik
84+ AUTHENTICATION_ENDPOINT : ' http://localhost:3000/auth'
0 commit comments