chore: migrate deprecated RxJS operator #120
This file contains 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: Playwright Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: "Build web" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: volta-cli/action@v4 | |
- name: Print node/npm/yarn info | |
id: info | |
run: | | |
node_ver=$( node --version ) | |
yarn_ver=$( yarn --version ) | |
echo "Node: ${node_ver:1}" | |
echo "NPM: $( npm --version )" | |
echo "Yarn: $yarn_ver" | |
echo "node_version=${node_ver:1}" >> $GITHUB_OUTPUT | |
echo "yarn_version=${yarn_ver}" >> $GITHUB_OUTPUT | |
echo "cache_dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Use yarn cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.info.outputs.cache_dir }} | |
key: ${{ runner.os }}-node-${{ steps.info.outputs.node_version }}-yarn-${{ steps.info.outputs.yarn_version }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ steps.info.outputs.node_version }}-yarn-${{ steps.info.outputs.yarn_version }}- | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build web | |
run: yarn build | |
test: | |
name: "Playwright Tests - Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }}" | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
shardTotal: [10] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: volta-cli/action@v4 | |
- name: Print node/npm/yarn info | |
id: info | |
run: | | |
node_ver=$( node --version ) | |
yarn_ver=$( yarn --version ) | |
echo "Node: ${node_ver:1}" | |
echo "NPM: $( npm --version )" | |
echo "Yarn: $yarn_ver" | |
echo "node_version=${node_ver:1}" >> $GITHUB_OUTPUT | |
echo "yarn_version=${yarn_ver}" >> $GITHUB_OUTPUT | |
echo "cache_dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Use yarn cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.info.outputs.cache_dir }} | |
key: ${{ runner.os }}-node-${{ steps.info.outputs.node_version }}-yarn-${{ steps.info.outputs.yarn_version }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ steps.info.outputs.node_version }}-yarn-${{ steps.info.outputs.yarn_version }}- | |
- run: npm install -g firebase-tools | |
- run: yarn | |
- uses: actions/cache@v3 | |
with: | |
path: dist | |
key: build-${{ github.run_number }} | |
- uses: actions/cache@v3 | |
with: | |
path: /home/runner/.cache/ms-playwright | |
key: playwright-install-${{ github.run_id }} | |
restore-keys: | | |
playwright-install | |
- name: Install Playwright Browsers | |
run: yarn playwright install --with-deps | |
- name: Run Playwright tests | |
run: yarn playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report-${{ matrix.shardIndex }} | |
path: playwright-report/ | |
retention-days: 30 | |
publish: | |
name: Publish Playwright merged report | |
if: always() | |
needs: test | |
runs-on: ubuntu-latest | |
# environment: | |
# name: ${{ inputs.environment }}-report | |
# url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- run: rm package.json yarn.lock .yarnrc.yml | |
- run: npm init -y -f | |
- uses: volta-cli/action@v4 | |
- run: volta pin node yarn | |
- name: Print node/npm/yarn info | |
id: info | |
run: | | |
node_ver=$( node --version ) | |
yarn_ver=$( yarn --version ) | |
echo "Node: ${node_ver:1}" | |
echo "NPM: $( npm --version )" | |
echo "Yarn: $yarn_ver" | |
echo "node_version=${node_ver:1}" >> $GITHUB_OUTPUT | |
echo "yarn_version=${yarn_ver}" >> $GITHUB_OUTPUT | |
echo "cache_dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Use yarn cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.info.outputs.cache_dir }} | |
key: ${{ runner.os }}-node-${{ steps.info.outputs.node_version }}-yarn-${{ steps.info.outputs.yarn_version }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ steps.info.outputs.node_version }}-yarn-${{ steps.info.outputs.yarn_version }}- | |
- uses: actions/download-artifact@v3 | |
with: | |
path: ./playwright-report | |
- run: yarn add @nil1511/playwright-merge-html-reports | |
- name: Merge Reports | |
run: yarn node merge-reports.js | |
# - name: Upload Pages Artifact | |
# uses: actions/upload-pages-artifact@v1 | |
# with: | |
# path: "./html-report" | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report-merged | |
path: html-report/ | |
retention-days: 30 | |
# - name: Setup Pages | |
# uses: actions/configure-pages@v1 | |
# - uses: actions/download-artifact@v3 | |
# with: | |
# name: "github-pages" | |
# - name: Deploy to GitHub Pages | |
# id: pages-deploy | |
# uses: actions/deploy-pages@v1 | |
# - name: Message PR of Artifact Published | |
# if: ${{ always() && github.event_name == 'pull_request' }} | |
# uses: thollander/actions-comment-pull-request@main | |
# with: | |
# message: | | |
# See Playwright Test Report at ${{steps.pages-deploy.outputs.page_url}} | |
# comment_includes: "See Playwright Test Report " | |
# pr_number: ${{ inputs.pr_number }} | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |