diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1d65f81af..72da8c44e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,10 +11,29 @@ on: branches: [ main ] release: types: [published] + schedule: + cron: '0 0 * * *' # Run every day at midnight jobs: - test: - name: Test + test-js: + name: Test JS + runs-on: ubuntu-latest + env: + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: 21 + registry-url: 'https://registry.npmjs.org' + - name: Checkout + uses: actions/checkout@v2 + - name: Test + run: | + make test-js + + test-go: + name: Test Go runs-on: ubuntu-latest container: ghcr.io/packagrio/packagr:latest-golang env: diff --git a/Makefile b/Makefile index 02a6b5bbe..63e6cacdf 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,9 @@ serve-backend: deps test: go test ./... +test-js: + cd js && yarn run e2e + # Steps related to building and publishing fasten-sources-js library. build-js: diff --git a/js/e2e/src/cigna_test.ts b/js/e2e/src/cigna_test.ts index 2c3e4b859..72cf89042 100644 --- a/js/e2e/src/cigna_test.ts +++ b/js/e2e/src/cigna_test.ts @@ -2,7 +2,7 @@ import { test, expect } from "@playwright/test"; import {getEndpointDefinition} from '../utils'; import {generateSourceAuthorizeUrl} from '../../src/connect/authorization-url'; -test("Cigna Login Flow", async ({page}, testInfo) => { +test.skip("Cigna Login Flow", async ({page}, testInfo) => { try { await page.evaluate(_ => {},`browserstack_executor: ${JSON.stringify({action: "setSessionName", arguments: {name:testInfo.title}})}`); await page.waitForTimeout(5000); diff --git a/js/package.json b/js/package.json index d371291f5..8ded59be0 100644 --- a/js/package.json +++ b/js/package.json @@ -6,7 +6,7 @@ "types": "index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "e2e": "npx playwright test --headed", + "e2e": "npx playwright test", "e2e-debug": "npx playwright test --headed --debug" }, "author": "Jason Kulatunga ", diff --git a/js/playwright.config.ts b/js/playwright.config.ts index 9c19c1d5d..46979a3b9 100644 --- a/js/playwright.config.ts +++ b/js/playwright.config.ts @@ -40,7 +40,7 @@ export default { /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: process.env.CI ? 'html' : 'line', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */