Skip to content

Commit

Permalink
Adding tests to Github CI #20
Browse files Browse the repository at this point in the history
  • Loading branch information
sauliusgrigaitis committed Mar 21, 2024
1 parent 6fe2be2 commit cac1303
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install packages
run: sudo scripts/ci/install.sh
- name: Submodules
run: git submodule update --init dedicated_executor eth2_libp2p
- name: Build
run: scripts/ci/ci.sh
run: cargo build --release
- name: Test
run: cargo test --release
41 changes: 41 additions & 0 deletions scripts/ci/github.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

set -o errexit
set -o nounset

cd "$(dirname "$0")"

export PATH="${CARGO_HOME:-$HOME/.cargo}/bin:$PATH"

git submodule update --init \
../../consensus-spec-tests \
../../eth2_libp2p \
../../grandine-snapshot-tests \
../../slashing-protection-interchange-tests
(
cd ../../consensus-spec-tests
git lfs pull
)

#curl \
# --fail \
# --proto =https \
# --show-error \
# --silent \
# --tlsv1.2 \
# https://sh.rustup.rs |
# sponge |
# sh -s -- --no-modify-path -y

# `cargo-fmt` must be run in the root of a crate. It appears to be a regression:
# <https://github.com/rust-lang/rustfmt/issues/3647>
# Running `cargo-fmt` with `--all` works too but takes noticeably longer. This explains why:
# <https://github.com/rust-lang/rustfmt/issues/4247#issuecomment-644957261>
(
cd ../..
cargo fmt -- --check
)

./clippy.bash --deny warnings
cargo test --release --no-fail-fast
./consensus-spec-tests-coverage.rb

0 comments on commit cac1303

Please sign in to comment.