diff --git a/.github/workflows/tests.yaml b/.github/workflows/ci.yaml similarity index 81% rename from .github/workflows/tests.yaml rename to .github/workflows/ci.yaml index 264b65f12..576e8e9fb 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Lambdaworks build checks +name: CI on: push: branches: [ main ] @@ -10,8 +10,8 @@ concurrency: cancel-in-progress: true jobs: - check: - name: Check + compile: + name: Compile runs-on: ubuntu-latest steps: - name: Checkout sources @@ -28,30 +28,8 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - - coverage: - runs-on: macos-latest - env: - CARGO_TERM_COLOR: always - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - - 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@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: lcov.info - fail_ci_if_error: true - - fmt: - name: Lints + lint: + name: Lint runs-on: ubuntu-latest steps: - name: Checkout sources @@ -70,13 +48,27 @@ jobs: with: command: fmt args: --all -- --check - - clippy: - runs-on: ubuntu-latest + + - name: Run clippy + run: make clippy + test: + name: Test + runs-on: macos-latest + env: + CARGO_TERM_COLOR: always steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - toolchain: stable - components: clippy - - run: make clippy + toolchain: stable + components: clippy + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Run tests and generate code coverage + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + fail_ci_if_error: true