Skip to content

feat: impl only index header mode by default (#31) #93

feat: impl only index header mode by default (#31)

feat: impl only index header mode by default (#31) #93

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: Check code formatting
run: cargo fmt -- --check
clippy:
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
build:
needs: [fmt, clippy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
tests:
needs: [build]
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"
up-flags: "--wait"
- name: Install required tools
run: cargo install cargo-llvm-cov && cargo install sqlx-cli --features postgres
- run: chmod +x scripts/run-coverage.sh && chmod +x scripts/run-migrations.sh
- name: Run migrations
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5433/fossil_test"
run: scripts/run-migrations.sh
- name: Run tests
run: scripts/run-coverage.sh
- uses: hrishikesh-kadam/setup-lcov@v1
with:
ref: v2.2
- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v4
with:
coverage-files: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
update-comment: true