Toolverse
All skills

exa-ci-integration

by jeremylongshore

Configure Exa CI/CD integration with GitHub Actions and testing.\nUse when setting up automated testing, configuring CI pipelines,\nor integrating Exa tests into your build process.\nTrigger with phrases like \

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Testing

About this skill

Configure Exa CI/CD integration with GitHub Actions and testing.\nUse when setting up automated testing, configuring CI pipelines,\nor integrating Exa tests into your build process.\nTrigger with phrases like \

How to use

  1. Włącz GitHub Actions w repozytorium i upewnij się, że masz dostęp do Node.js 20+ oraz npm/pnpm. Przygotuj projekt z testami (vitest lub jest) i zainstaluj zależności.

  2. Dodaj klucz API Exa do GitHub Secrets — przejdź do Settings → Secrets and variables → Actions, utwórz nowy secret o nazwie EXA_API_KEY i wklej wartość klucza.

  3. Utwórz plik workflow w .github/workflows/exa-tests.yml. Workflow powinien zawierać trzy sekcje: unit-tests (testy mockowane, uruchamiane zawsze), integration-tests (testy z prawdziwym API, tylko na głównym repozytorium) i exa-health-check (weryfikacja dostępności API).

  4. W sekcji unit-tests skonfiguruj checkout, setup Node.js z cache npm, instalację zależności (npm ci) i uruchomienie npm run test:unit. Testy jednostkowe nie wymagają klucza API.

  5. W sekcji integration-tests ustaw zmienną środowiskową EXA_API_KEY z secrets, dodaj warunek if aby testy integracyjne nie uruchamiały się na fork'ach (gdzie brak dostępu do secrets), i uruchom npm run test:integration z timeoutem 5 minut.

  6. Zatwierdź workflow do repozytorium. Od teraz testy będą uruchamiać się automatycznie przy każdym push na main i pull request — unit testy zawsze, integracyjne tylko w głównym repozytorium dla bezpieczeństwa klucza API.

Related skills