test: publish to gamma and run smoke test on merge #2037
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: AWS RUM Web Client Continuous Build | |
| on: | |
| push: | |
| branches: [main, release/*.*.*] | |
| pull_request: | |
| branches: [main, release/*.*.*] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-test: | |
| name: Check Format and Run Unit Tests | |
| runs-on: ubuntu-latest | |
| permissions: read-all | |
| steps: | |
| - name: Checkout AWS RUM Web Client Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Cache NPM modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - run: npm ci | |
| - name: Check Code Format | |
| run: npx prettier --check . | |
| - name: Run Linter | |
| run: npm run lint:errors | |
| - name: Run Unit Tests | |
| run: npm run test | |
| integ-test: | |
| name: Run Integ Tests (${{ matrix.browser }} on ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: read-all | |
| env: | |
| NODE_OPTIONS: --max-http-header-size=80000 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| browser: [firefox, chrome, webkit, edge] | |
| exclude: | |
| - os: ubuntu-latest | |
| browser: webkit | |
| - os: windows-latest | |
| browser: webkit | |
| steps: | |
| - name: Checkout AWS RUM Web Client Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Cache NPM modules and Playwright browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-deps-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-deps- | |
| - run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install | |
| - name: Run Integration Tests | |
| run: npm run integ:${{ matrix.browser }} |