Skip to content

Commit

Permalink
fix: refactor ci (bgd-labs#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Nov 18, 2024
1 parent 9ed1c54 commit cd6c048
Showing 1 changed file with 39 additions and 11 deletions.
50 changes: 39 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,46 @@ jobs:
run: yarn lint --check

test-sol:
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
secrets: inherit
with:
mode: "CHANGED"
name: Foundry build n test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

test-sol-zksync:
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
secrets: inherit
with:
mode: "CHANGED"
zksync: true
ROOT_DIR: "zksync"
- uses: bgd-labs/action-rpc-env@main
with:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

# we simply use foundry zk for all jobs in this repo
- name: Run Foundry setup
uses: bgd-labs/github-workflows/.github/actions/foundry-setup@main
with:
ZKSYNC: "true"

- name: Run Forge tests
id: test
uses: bgd-labs/github-workflows/.github/actions/foundry-test@main
with:
MODE: "CHANGED"

- name: Run ZK tests
id: zktest
uses: bgd-labs/github-workflows/.github/actions/foundry-test@main
with:
MODE: "CHANGED"
ZKSYNC: true
ROOT_DIR: "zksync"

- name: Run Forge tests
uses: bgd-labs/github-workflows/.github/actions/comment-artifact@main

# we let failing tests pass so we can log them in the comment, still we want the ci to fail
- name: Post test
if: ${{ steps.test.outputs.testStatus != 0 || steps.zktest.outputs.testStatus != 0 }}
run: |
echo "tests failed"
exit 1
test-js:
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main
Expand Down

0 comments on commit cd6c048

Please sign in to comment.