Skip to content

Commit

Permalink
Fix CI WebKit Tests (#67)
Browse files Browse the repository at this point in the history
* Switch browser tests to macOS runner to support testing with WebKit (Safari)
* For CI test runts, install Playwright before dependencies and ensure at least 1 passing test per project to avoid NPM errors

Signed-off-by: Frank Hinek <[email protected]>
  • Loading branch information
frankhinek authored May 17, 2023
1 parent 561f475 commit bbbf2b0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
workflow_dispatch:

jobs:
test-on-node:
test-with-node:
runs-on: ubuntu-latest
steps:
- name: Checkout source
Expand All @@ -36,8 +36,9 @@ jobs:
- name: Run tests for all packages
run: npm run test:node --ws

test-on-browsers:
runs-on: ubuntu-latest
test-with-browsers:
# Run browser tests using macOS so that WebKit tests don't fail under a Linux environment
runs-on: macos-latest
steps:
- name: Checkout source
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand All @@ -51,12 +52,12 @@ jobs:
- name: Install latest npm
run: npm install -g npm@latest

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Install dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Build all workspace packages
run: npm run build

Expand Down
6 changes: 5 additions & 1 deletion packages/crypto/tests/needed.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { expect } from 'chai';

describe('@tbd54566975/crypto', () => {
xit('should have tests');
it('should have tests', () => {
expect(true).to.equal(true);
});
});
6 changes: 5 additions & 1 deletion packages/web5-agent/tests/needed.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { expect } from 'chai';

describe('@tbd54566975/web5-agent', () => {
xit('should have tests');
it('should have tests', () => {
expect(true).to.equal(true);
});
});
6 changes: 5 additions & 1 deletion packages/web5-proxy-agent/tests/needed.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { expect } from 'chai';

describe('@tbd54566975/web5-proxy-agent', () => {
xit('should have tests');
it('should have tests', () => {
expect(true).to.equal(true);
});
});

0 comments on commit bbbf2b0

Please sign in to comment.