Skip to content

Commit

Permalink
ci: split build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Dec 7, 2023
1 parent 3f21987 commit 798c42e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Build

on:
push:
Expand All @@ -15,12 +15,12 @@ permissions:
contents: read

jobs:
bulid_and_test:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rustup
run: rustup update stable
run: rustup toolchain install stable --profile minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
Expand All @@ -34,12 +34,3 @@ jobs:
run: mkdir -p app/build
- name: Build
run: cargo build --verbose --workspace
- name: Test
run: cargo llvm-cov --workspace --lcov --output-path lcov.info --all-features
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
fail_ci_if_error: false
File renamed without changes.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches:
- main
tags:
- "*"
pull_request:

env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rustup
run: rustup toolchain install stable --profile minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test
run: cargo llvm-cov --workspace --lcov --output-path lcov.info --all-features
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
fail_ci_if_error: false

0 comments on commit 798c42e

Please sign in to comment.