forked from imagekit-developer/imagekit-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 1.77 KB
/
nodejs.yml
File metadata and controls
77 lines (65 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Node CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install -g @angular/cli@12.2.18
cd sdk
npm install
npm run test:ci
npm run build
env:
CI: true
e2e:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build and pack SDK
run: |
cd sdk
npm install
npm run build
npm run pack
- name: Install SDK in test-app
run: |
cd test-app
# Get SDK version from sdk/package.json
SDK_VERSION=$(node -p "require('../sdk/package.json').version")
echo "Installing SDK version: $SDK_VERSION"
# Update package.json to use the packed tarball
npm install ../sdk/dist/imagekit-angular/imagekit-angular-${SDK_VERSION}.tgz
npm install
- name: Start test-app server
run: |
cd test-app
npm start &
npx wait-on http://localhost:4200 --timeout 60000
- name: Run Cypress E2E tests
uses: cypress-io/github-action@v6
with:
install: false
working-directory: test-app
wait-on: 'http://localhost:4200'
wait-on-timeout: 60
env:
DEBUG: 'cypress:server:browsers:electron'
CI: true