Skip to content

chore: setup ci for testing with docker compose #74

chore: setup ci for testing with docker compose

chore: setup ci for testing with docker compose #74

Workflow file for this run

name: Rust CI
on:
push:
branches:
- main
- sepolia-db
pull_request:
branches:
- main
- sepolia-db
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Setup toolchain
run: rustup toolchain install stable
- name: Install dependencies
run: cargo fetch
- name: Install coverage tool
run: cargo install cargo-tarpaulin
- name: Check code formatting
run: cargo fmt -- --check
clippy:
needs: [fmt]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
tests:
needs: [fmt, clippy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Setup test env
uses: hoverkraft-tech/[email protected]
with:
compose-file: "./docker-compose.test.yml"
- run: chmod +x scripts/run-coverage.sh
- name: Run tests
run: scripts/run-coverage.sh
- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v4
with:
coverage-files: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
update-comment: true