analytics/.github/workflows/tracker.yml
Uku Taht 99fd101135
Add basic test harness for browserstack/playwright (#1961)
* Add basic test harness for browserstack/playwright

* Refactor the tests

* added the first test for outbound links

* tests for outbound-links and file-downloads

* added more browser versions to test on

* Lint tracker test files

* Update harness.js with BrowserStack example

* Fix Playwright request mocks

* Add test harness to CI

* Remove Safari on Windows from browsers list

Co-authored-by: Robert <robertjoonas16@gmail.com>
Co-authored-by: Vinicius Brasil <vini@hey.com>
2022-08-04 11:50:09 +03:00

34 lines
942 B
YAML

name: Tracker CI
on:
workflow_dispatch:
pull_request:
paths:
- 'tracker/**'
jobs:
build:
name: Build and test
runs-on: buildjet-4vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v2
- name: Read .tool-versions
uses: marocchino/tool-versions-action@v1
id: versions
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{steps.versions.outputs.nodejs}}
- name: 'BrowserStack Env Setup'
uses: 'browserstack/github-actions/setup-env@master'
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
build-name: 'BUILD_INFO'
- run: npm install --prefix ./tracker
- run: npm run deploy --prefix ./tracker
- name: "Install Playwright dependencies"
working-directory: ./tracker
run: npx playwright install-deps
- run: npm --prefix ./tracker test