pnpm up -L -r #564
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: npm-pkg-e2e-test | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - develop | |
| - feature/* | |
| paths: | |
| - .github/workflows/npm-pkg-e2e-test.yml | |
| - e2e-tests/** | |
| schedule: | |
| # UTC 時間で毎日 2:00 (JST で 11:00) に実行、月曜日から金曜日 | |
| - cron: "0 2 * * 1-5" | |
| jobs: | |
| npm-pkg-e2e-test: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # メンテナンスはおてて | |
| sdk_version: | |
| # canary リリースを含める | |
| - "2025.1.0" | |
| - "2024.2.2" | |
| - "2024.1.2" | |
| - "2023.2.0" | |
| - "2023.1.0" | |
| - "2022.3.3" | |
| - "2022.2.0" | |
| - "2022.1.0" | |
| - "2021.2.3" | |
| # 2020.1.7 より前は E2E テストが通らない | |
| - "2021.1.7" | |
| node: | |
| # 30 Apr 2028 End of Life | |
| - "24" | |
| # 30 Apr 2027 End of Life | |
| - "22" | |
| # 30 Apr 2026 End of Life | |
| - "20" | |
| browser: | |
| - name: "Google Chrome" | |
| type: "chrome" | |
| - name: "Microsoft Edge" | |
| type: "msedge" | |
| env: | |
| VITE_TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }} | |
| VITE_TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }} | |
| VITE_TEST_API_URL: ${{ secrets.TEST_API_URL }} | |
| VITE_TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }} | |
| NPM_PKG_E2E_TEST: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: tailscale/github-action@v4 | |
| with: | |
| oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} | |
| oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} | |
| tags: tag:ci | |
| version: latest | |
| use-cache: "true" | |
| hostname: gha-${{ github.run_id }}-${{ github.run_number }} | |
| timeout: 2m | |
| retry: 5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| # sora-js-sdk を npm からインストールする | |
| - run: pnpm --version | |
| - run: pnpm install | |
| - run: pnpm add -E sora-js-sdk@${{ matrix.sdk_version }} | |
| working-directory: ./e2e-tests | |
| # pnpm run build しない | |
| - run: pnpm playwright install ${{ matrix.browser.type }} --with-deps | |
| - run: pnpm playwright test --project="${{ matrix.browser.name }}" | |
| env: | |
| VITE_TEST_CHANNEL_ID_SUFFIX: _${{ github.run_id }}_${{ matrix.node }} | |
| # - uses: actions/upload-artifact@v4 | |
| # if: always() | |
| # with: | |
| # name: playwright-report | |
| # path: playwright-report/ | |
| # retention-days: 30 | |
| # slack_notify_succeeded: | |
| # needs: [npm-pkg-e2e-test] | |
| # runs-on: ubuntu-24.04 | |
| # if: success() | |
| # steps: | |
| # - name: Slack Notification | |
| # uses: rtCamp/action-slack-notify@v2 | |
| # env: | |
| # SLACK_CHANNEL: sora-js-sdk | |
| # SLACK_COLOR: good | |
| # SLACK_TITLE: Succeeded | |
| # SLACK_ICON_EMOJI: ":star-struck:" | |
| # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| slack_notify_failed: | |
| needs: [npm-pkg-e2e-test] | |
| runs-on: ubuntu-24.04 | |
| if: failure() | |
| steps: | |
| - name: Slack Notification | |
| uses: rtCamp/action-slack-notify@v2 | |
| env: | |
| SLACK_CHANNEL: sora-js-sdk | |
| SLACK_COLOR: danger | |
| SLACK_TITLE: Failed | |
| SLACK_ICON_EMOJI: ":japanese_ogre:" | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |