Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-codecov committed Jan 9, 2024
1 parent 5f3182b commit f18f48c
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: codecov-rs CI

on:
push:
branches:
- main
pull_request:


concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
name: Lint (rustfmt + clippy)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Run lint
run: |
cargo fmt --all --check
cargo clippy
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Run build
run: |
cargo build
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Run tests
run: |
cargo test
- name: Install `cargo llvm-cov`
uses: taiki-e/install-action@cargo-llvm-cov
- name: Collect coverage
run: |
cargo llvm-cov --no-default-features --lcov --output-path lcov.info
- name: Upload to Codecov
uses: codecov/codecov-action@v4-beta
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}

0 comments on commit f18f48c

Please sign in to comment.