Skip to content

Commit

Permalink
feat(ci): Add action tests to CI (#533)
Browse files Browse the repository at this point in the history
* feat(ci): Add action tests to CI

* clone monorepo ahead of time
  • Loading branch information
clabby committed Sep 17, 2024
1 parent 2f57beb commit 31afe9d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/action_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Action Tests
on:
push:
branches: [main]
merge_group:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
action-tests:
name: FPP actions
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Clone monorepo
run: |
git clone https://github.com/ethereum-optimism/monorepo
- name: Install just
uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Setup Go toolchain
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
cache-dependency-path: |
monorepo/go.sum
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run Actions Tests
run: |
just action-tests
4 changes: 3 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ action-tests test_name='Test_ProgramAction':
if [ ! -d "monorepo" ]; then
echo "Monorepo not found. Cloning..."
git clone https://github.com/ethereum-optimism/monorepo
fi

if [ ! -d "monorepo/.devnet" ]; then
echo "Building devnet allocs for the monorepo"
(cd monorepo && make devnet-allocs)
fi
Expand All @@ -44,7 +46,7 @@ action-tests test_name='Test_ProgramAction':
export KONA_CLIENT_PATH="{{justfile_directory()}}/target/release-client-lto/kona"

cd monorepo/op-e2e/actions/proofs && \
gotestsum --format=testname -- -run "{{test_name}}" -v ./...
go test -run "{{test_name}}" -v ./...

# Clean the action tests directory
clean-actions:
Expand Down

0 comments on commit 31afe9d

Please sign in to comment.