I18n Support #63
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build_and_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
# - macos-latest | |
# - windows-latest | |
node_version: | |
# - 18 | |
- 20 | |
# - 22 | |
architecture: | |
- x64 | |
name: E2E tests with node@${{ matrix.node_version }} on ${{ matrix.os }} - ${{ matrix.architecture }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - uses: pnpm/action-setup@v4 | |
# name: Install pnpm | |
# with: | |
# version: 9 | |
- uses: wyvox/action-setup-pnpm@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
# - name: Install Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: ${{ matrix.node_version }} | |
# architecture: ${{ matrix.architecture }} | |
# cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
# - name: Get pnpm store directory | |
# shell: bash | |
# run: | | |
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
# - uses: actions/cache@v4 | |
# name: Setup pnpm cache | |
# with: | |
# path: ${{ env.STORE_PATH }} | |
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pnpm-store- | |
# - name: Set SENTRY_AUTH_TOKEN env if secret exists | |
# run: | | |
# if [[ -n "${{ secrets.SENTRY_AUTH_TOKEN }}" ]]; then | |
# echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> $GITHUB_ENV | |
# fi | |
- name: Build Next.js for E2E tests | |
run: pnpm build | |
# TODO: Add commitlint to PRs | |
# - if: github.event_name == 'pull_request' | |
# name: Validate all commits from PR | |
# run: pnpx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
# - name: Linter | |
# run: pnpm lint | |
# - name: Upload coverage reports to Codecov | |
# uses: codecov/codecov-action@v3 | |
# env: | |
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Install Playwright (used for Storybook and E2E tests) | |
run: npx playwright install --with-deps | |
# - name: Run storybook tests | |
# run: pnpm run test-storybook:ci | |
- name: Run E2E tests | |
run: pnpm run test:e2e | |
# env: | |
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: test-results | |
path: test-results/ | |
retention-days: 30 |