Skip to content

Javascript Tests

Javascript Tests #1786

name: Javascript Tests
on:
schedule:
- cron: 0 */6 * * *
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
inputs:
# trunk-ignore(checkov/CKV_GHA_7)
cli-version:
type: string
required: false
description:
The version of `analytics-cli` to use. Defaults to the latest specified in
`analytis-uploader`.
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install Dependencies
run: |
pnpm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Tests
id: tests
shell: bash
run: npm run test
continue-on-error: true
- name: Upload JUnit.xml
if: always()
uses: trunk-io/analytics-uploader@main
with:
junit-paths: "**/*_test.xml,**/junitresults-*.xml"
org-slug: totally-real-saas
token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io