Skip to content

Commit

Permalink
chore: Fix run tests script
Browse files Browse the repository at this point in the history
  • Loading branch information
alon-dotan-starkware committed Jul 17, 2024
1 parent 6b8f0db commit 8529bce
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,50 @@ jobs:
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
ci/bin/python scripts/run_tests.py --changes_only --commit_id ${{ github.base_ref }}
ci/bin/python scripts/run_tests.py --changes_only --features concurrency --commit_id ${{ github.base_ref }}
ci/bin/python scripts/run_tests.py --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
ci/bin/python scripts/run_tests.py --changes_only --features concurrency --commit_id ${{ github.event.pull_request.base.sha }}
env:
SEED: 0

# Keep the name 'udeps' to match original action name, so we don't need to define specific branch
# rules on Github for specific version branches.
udeps:
machete:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Machete (detect unused dependencies)
uses: bnjbvr/cargo-machete@main


udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
name: "Rust Toolchain Setup"
with:
toolchain: nightly-2024-01-12
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0
with:
version: ${{env.PROTOC_VERSION}}

- name: "Download and run cargo-udeps"
run: |
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz
cargo-udeps-*/cargo-udeps udeps
env:
RUSTUP_TOOLCHAIN: nightly-2024-01-12

check:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0
with:
version: ${{env.PROTOC_VERSION}}
- run: cargo check --workspace -r --all-features
2 changes: 1 addition & 1 deletion scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_local_changes(repo_path, commit_id: Optional[str]) -> List[str]:
print(f"unable to validate {repo_path} as a git repo.")
raise

return [c.a_path for c in repo.head.commit.diff(None)]
return [c.a_path for c in repo.head.commit.diff(commit_id)]


def get_modified_packages(files: List[str]) -> Set[str]:
Expand Down

0 comments on commit 8529bce

Please sign in to comment.