Skip to content

Commit

Permalink
fix: diffrent ci method
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaynexus committed Mar 23, 2024
1 parent 5b54cfd commit ce3c5ea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/PRAutoTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ on:
pull_request:
paths:
- 'src/test/*_exp.sol'

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
Expand All @@ -15,15 +17,19 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # Required to fetch all branches
fetch-depth: 0 # Required to fetch all branches

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Forge tests
run: |
shopt -s nullglob
changed_files=$(git diff --name-only ${{ github.base_ref }} HEAD)
base_sha=${{ github.event.pull_request.base.sha }}
head_sha=${{ github.event.pull_request.head.sha }}
changed_files=$(git diff --name-only $base_sha $head_sha)
for file in $changed_files; do
if [[ $file == src/test/*_exp.sol ]]; then
forge test --contracts "$file" -vvv
Expand Down

0 comments on commit ce3c5ea

Please sign in to comment.