Run your ZeniTest suite automatically whenever you push code or open a pull request.
GitHub Actions Workflow
Section titled “GitHub Actions Workflow”Create a file named .github/workflows/e2e.yml in your repository:
name: E2E Tests
on: push: branches: [main] pull_request: branches: [main]
jobs: test: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4
- name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20
- name: Install ZeniTest run: npm install -g zenitest
- name: Run Tests env: ZENI_API_KEY: ${{ secrets.ZENI_API_KEY }} run: zenitest run --platform webAdding your API Key to GitHub
Section titled “Adding your API Key to GitHub”- Go to your GitHub repository Settings.
- Click Secrets and variables > Actions.
- Click New repository secret.
- Set the name to
ZENI_API_KEYand paste your API key in the value box.