Skip to content

Commit 28fbf75

Browse files
committed
add jsdom and new workflow file to test
1 parent 9ee8d19 commit 28fbf75

File tree

3 files changed

+368
-0
lines changed

3 files changed

+368
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "Test (new setup)"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: CI Setup
21+
uses: ./.github/actions/ci-setup
22+
23+
- name: Forc Format Check
24+
run: pnpm forc:check
25+
26+
- name: Build
27+
run: |
28+
BUILD_VERSION="0.0.0-${{ github.ref_name }}-$(git rev-parse --short $GITHUB_SHA)" pnpm build
29+
30+
- name: Lint
31+
run: |
32+
pnpm lint
33+
34+
- name: Checking PR Number
35+
uses: jwalton/gh-find-current-pr@v1
36+
id: findPr
37+
38+
- name: Node unit tests
39+
run: pnpm test --group=node/unit
40+
41+
- name: Node e2e tests
42+
run: pnpm test --group=node/e2e
43+
44+
- name: Node+browser unit tests
45+
run: pnpm test --group=common/unit --env=jsdom && pnpm test --group=common/unit
46+
47+
- name: Node+browser e2e tests
48+
run: pnpm test --group=common/e2e --env=jsdom && pnpm test --group=common/e2e
49+
50+
# - name: Run tests and publish coverage
51+
# uses: ArtiomTr/jest-coverage-report-action@v2
52+
# if: ${{ steps.findPr.outputs.number }}
53+
# with:
54+
# github-token: ${{ secrets.GITHUB_TOKEN }}
55+
# package-manager: pnpm
56+
# annotations: failed-tests
57+
# test-script: pnpm ci:test
58+
# prnumber: ${{ steps.findPr.outputs.number }}
59+
60+
# - name: Run tests no coverage publishing
61+
# if: ${{ !steps.findPr.outputs.number }}
62+
# run: |
63+
# pnpm ci:test

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"ethers": "^5.7.2",
6868
"forc-bin": "workspace:*",
6969
"jest": "^29.3.1",
70+
"jest-environment-jsdom": "^29.3.1",
7071
"jest-runner-groups": "^2.2.0",
7172
"markdownlint": "^0.23.1",
7273
"markdownlint-cli": "^0.27.1",

0 commit comments

Comments
 (0)