Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
brech1 committed Jun 16, 2024
1 parent 45bfb70 commit 0d17638
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 93 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/build.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
CARGO_TERM_COLOR: always
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
~/.cargo
~/.rustup/toolchains
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install Rust
run: |
rustup toolchain install stable
rustup component add rustfmt clippy
- uses: Swatinem/rust-cache@v2

build:
runs-on: ubuntu-latest
needs: ci

steps:
- name: Build
run: cargo build --verbose

- name: Clippy
run: cargo clippy --verbose -- -D warnings

- name: Tests
run: cargo test --verbose

- name: Fmt
run: cargo fmt -- --check

coverage:
runs-on: ubuntu-latest
needs: setup

steps:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true
28 changes: 0 additions & 28 deletions .github/workflows/coverage.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/setup.yml

This file was deleted.

0 comments on commit 0d17638

Please sign in to comment.