Fix Firefox manifest warning for version_name property #24
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: Test | |
| on: | |
| push: | |
| branches: [development] | |
| pull_request: | |
| branches: [development] | |
| workflow_call: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| # TODO: Remove continue-on-error once #6 (flaky Windows test) is resolved | |
| continue-on-error: ${{ matrix.os == 'windows-latest' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: Log environment versions | |
| run: | | |
| echo "OS: ${{ matrix.os }}" | |
| echo "Node: $(node --version)" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ matrix.os == 'macos-latest' && '~/Library/Caches/ms-playwright' || (matrix.os == 'windows-latest' && '~/AppData/Local/ms-playwright' || '~/.cache/ms-playwright') }} | |
| key: playwright-${{ matrix.os }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: npx playwright install chromium --with-deps | |
| # Only needed on Linux - Windows/macOS have system deps pre-installed | |
| - name: Install Playwright dependencies (Linux only) | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' && matrix.os == 'ubuntu-latest' | |
| run: npx playwright install-deps chromium | |
| - name: Build Chrome extension | |
| run: npm run build:chrome | |
| - name: Run tests | |
| run: npm test | |
| env: | |
| API_CONTRACT_TEST_PAT: ${{ secrets.API_CONTRACT_TEST_PAT }} | |
| - name: Upload Chrome extension | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: chrome-extension-${{ matrix.os }} | |
| path: build/bundle/*.zip | |
| retention-days: 7 | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report-${{ matrix.os }} | |
| path: playwright-report/ | |
| retention-days: 7 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.os }} | |
| path: test-results/ | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| lint: | |
| runs-on: macos-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build Firefox extension | |
| run: npm run build:firefox | |
| - name: Lint extension | |
| run: npm run lint | |
| - name: Upload Firefox extension | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firefox-extension | |
| path: build/bundle/*.xpi | |
| retention-days: 7 |