SEO unit tests #1960
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: SEO unit tests | |
on: | |
workflow_run: | |
workflows: ["Build and Deploy"] | |
types: | |
- completed | |
jobs: | |
ci: | |
if: ${{ vars.IS_STAGING != 'true' && github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
container: buildkite/puppeteer:latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Setup git in container 🛠 | |
uses: actions/checkout@v4 | |
- name: Setup Node 🔧 | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Cache Modules 📦 | |
id: cache-modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
key: ${{ runner.os }}-cache-modules-${{ hashFiles('**/yarn.lock')}} | |
restore-keys: | | |
${{ runner.os }}-cache-modules- | |
- name: Install Dependencies ⏳ | |
if: steps.cache-modules.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Run tests 🧪 | |
id: tests | |
continue-on-error: true | |
run: | | |
npx puppeteer browsers install chrome | |
yarn test | |
- name: Send test results to Slack 📬 | |
run: node src/tests/send-report.js ${{ github.repository }} ${{ github.run_id }} ${{ secrets.SLACK_WEBHOOK_URL_UNIT_TESTS }} |