88
99 strategy :
1010 matrix :
11- node-version : [12 .x]
11+ node-version : [20 .x]
1212
1313 steps :
1414 - uses : actions/checkout@v1
@@ -18,74 +18,17 @@ jobs:
1818 with :
1919 node-version : ${{ matrix.node-version }}
2020
21- - name : Setup module and run unit tests
22- run : |
23- npm install
24- # npm run test:ci
25- env :
26- CI : true
27- REACT_APP_PUBLIC_KEY : ${{ secrets.ik_public_key }}
28- REACT_APP_PRIVATE_KEY : ${{ secrets.ik_private_key }}
29- REACT_APP_URL_ENDPOINT : ${{ secrets.ik_url_endopint }}
30-
31- e2e :
32- runs-on : ubuntu-latest
33-
34- strategy :
35- matrix :
36- node-version : [12.x]
37-
38- steps :
39- - uses : actions/checkout@v1
40-
41- - name : Use Node.js ${{ matrix.node-version }}
42- uses : actions/setup-node@v1
43- with :
44- node-version : ${{ matrix.node-version }}
45-
46- - name : Setup module
21+ - name : Build and Test
4722 run : |
4823 npm install
4924 npm run build
5025 npm pack
51- - name : build test-app
52- run : |
53- cd tests/test-app
54- 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
60- echo PRIVATE_KEY = ${{ secrets.ik_private_key }} >> .env;
61- npm install
26+ # cd test-app
27+ # npm install
28+ # npm install ../imagekit-react-*.tgz --no-save
29+ # npx playwright install --with-deps
30+ # npm run test:e2e
6231 env :
6332 CI : true
64- REACT_APP_PUBLIC_KEY : ${{ secrets.ik_public_key }}
65- REACT_APP_PRIVATE_KEY : ${{ secrets.ik_private_key }}
66- REACT_APP_URL_ENDPOINT : ${{ secrets.ik_url_endopint }}
6733
68- - name : Run E2E tests
69- uses : cypress-io/github-action@v4
70- with :
71- start : npm run serve:test-app
72- wait-on : ' http://localhost:4000, http://localhost:4001'
73- env :
74- DEBUG : ' cypress:server:browsers:electron'
75- CI : true
76- REACT_APP_PUBLIC_KEY : ${{ secrets.ik_public_key }}
77- REACT_APP_PRIVATE_KEY : ${{ secrets.ik_private_key }}
78- REACT_APP_URL_ENDPOINT : ${{ secrets.ik_url_endopint }}
79- REACT_APP_AUTHENTICATION_ENDPOINT : ' http://localhost:4001/auth'
80-
81- - name : tar workspace
82- if : always()
83- run : |
84- tar -cf build.tar --exclude=./build.tar .
85- - name : Archive build details
86- if : always()
87- uses : actions/upload-artifact@v4
88- with :
89- name : e2e-archive
90- path : build.tar
91- retention-days : 1
34+
0 commit comments