Skip to content

Commit

Permalink
free disk space and add codecov token
Browse files Browse the repository at this point in the history
  • Loading branch information
ggonzalez94 committed Jul 24, 2024
1 parent 05c567b commit 0476148
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/codecov-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,42 @@ on:
jobs:
coverage:
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
name: Code Coverage
steps:
# The build artifacts generated by Polkadot projects are already large
# and even larger when using llvm-cov. This step removes some of the larger and unused files
- name: Free disk space
run: |
echo "Freeing up disk space..."
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean
docker rmi $(docker image ls -aq)
df -h
- uses: actions/checkout@v4
with:
submodules: true

- name: Cache cargo registry & git sources
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-unittest-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-unittest-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-unittest-
${{ runner.os }}-cargo-
- name: Run sccache
uses: mozilla-actions/[email protected]

- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -29,12 +59,14 @@ jobs:
- name: Install protoc
uses: arduino/setup-protoc@v3

- name: cargo generate-lockfile
- name: Generate lockfile if it doesn't exist
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: cargo llvm-cov
run: cargo llvm-cov --locked --lcov --output-path lcov.info
# Follow the test command in `coverage.yml`
# but without release mode to avoid long build times
run: cargo llvm-cov nextest --workspace --features=evm-tracing --lcov --output-path lcov.info

- name: Record Rust version
run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV"
Expand All @@ -44,3 +76,4 @@ jobs:
with:
fail_ci_if_error: true
env_vars: OS,RUST
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 0476148

Please sign in to comment.