Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: enable forge test github action by revise workflow file #15

Merged
merged 6 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: test

on: workflow_dispatch
on:
pull_request:
push:
branches:
- main
- release/**
tags:
- "*"

env:
FOUNDRY_PROFILE: ci
Expand All @@ -20,7 +27,9 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# replace nightly because latest nightly release has some breaking changes that result in test failures
# this is a previous recent nightly release that should work
version: nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9
adu-web3 marked this conversation as resolved.
Show resolved Hide resolved

- name: Run Forge build
run: |
Expand All @@ -32,3 +41,16 @@ jobs:
run: |
forge test -vvv
id: test

- name: Add comment on failure
if: failure()
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'The GitHub Actions workflow has failed. Please check the logs for more details.'
})
Loading