-
Notifications
You must be signed in to change notification settings - Fork 33
41 lines (34 loc) · 1.3 KB
/
integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Runs Alloy integration tests daily to ensure compatibility with the latest version of Alloy.
name: Integration
on:
schedule:
# Run daily
- cron: "0 0 * * *"
workflow_dispatch:
# Needed so we can run it manually
jobs:
integration:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: foundry-rs/foundry-toolchain@v1
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run examples
run: |
# Run examples with the current version of Alloy
./scripts/run.sh
# Fetch the latest commit hash of the `main` branch from the Alloy repository
export latest_alloy_commit=$(git ls-remote https://github.com/alloy-rs/alloy.git \
| grep refs/heads/main \
| cut -f 1)
# Use the commit hash to update the rev in Cargo.toml
sed -i '/alloy = { version = "[^"]*", features = \[/,/\] }/s/alloy = { version = "[^"]*",/alloy = { git = "https:\/\/github.com\/alloy-rs\/alloy", rev = "'"$latest_alloy_commit"'",/' \
Cargo.toml
# Update to the latest commit
cargo update
# Run the examples with the latest version of Alloy
./scripts/run.sh