feat: angular sdk overhaul #628
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/[email protected] | |
| 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 |