Skip to content

Commit cf1d385

Browse files
ci(library-solidity): merge hardhat and foundry tests (#1459)
1 parent 974c340 commit cf1d385

File tree

2 files changed

+34
-62
lines changed

2 files changed

+34
-62
lines changed

.github/workflows/library-solidity-hardhat-tests.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/library-solidity-forge-tests.yml renamed to .github/workflows/library-solidity-tests.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: library-solidity-forge-tests
1+
name: library-solidity-tests
22

33
on:
44
pull_request:
@@ -7,28 +7,52 @@ permissions: {}
77

88
jobs:
99
check-changes:
10-
name: library-solidity-forge-tests/check-changes
1110
permissions:
12-
actions: "read" # Required to read workflow run information
13-
contents: "read" # Required to checkout repository code
14-
pull-requests: "read" # Required to read pull request information
11+
actions: 'read' # Required to read workflow run information
12+
contents: 'read' # Required to checkout repository code
13+
pull-requests: 'read' # Required to read pull request information
1514
runs-on: ubuntu-latest
1615
outputs:
1716
changes-library-solidity: ${{ steps.filter.outputs.library-solidity }}
1817
steps:
1918
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2019
with:
21-
persist-credentials: "false"
22-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
20+
persist-credentials: 'false'
21+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
2322
id: filter
2423
with:
2524
filters: |
2625
library-solidity:
27-
- .github/workflows/library-solidity-forge-tests.yml
26+
- .github/workflows/library-solidity-tests.yml
2827
- library-solidity/**
2928
- host-contracts/**
30-
build:
31-
name: library-solidity-forge-tests/build (bpr)
29+
30+
hardhat-tests:
31+
name: hardhat-tests
32+
needs: check-changes
33+
if: ${{ needs.check-changes.outputs.changes-library-solidity == 'true' }}
34+
runs-on: large_ubuntu_32
35+
strategy:
36+
matrix:
37+
node-version: [20.x]
38+
permissions:
39+
contents: 'read' # Required to checkout repository code
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
with:
44+
persist-credentials: 'false'
45+
- name: Use Node.js ${{ matrix.node-version }}
46+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
47+
with:
48+
node-version: ${{ matrix.node-version }}
49+
- run: cp ./library-solidity/.env.example ./library-solidity/.env
50+
- run: npm --workspace=library-solidity ci --include=optional
51+
- name: "Run JS/TS tests"
52+
run: npm --workspace=library-solidity run test
53+
54+
forge-tests:
55+
name: forge-tests
3256
needs: check-changes
3357
if: ${{ needs.check-changes.outputs.changes-library-solidity == 'true' }}
3458
runs-on: large_ubuntu_32

0 commit comments

Comments
 (0)