Skip to content

Commit

Permalink
Update CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cowuake committed Apr 21, 2024
1 parent c6dd323 commit a18fda4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
name: CI

on:
push:
branches:
- main
paths:
- .github/workflows/**
- schemius/**
- schemius-native/**
- schemius-web/**
pull_request:
push:
branches:
- main
paths:
Expand All @@ -25,24 +18,33 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
toolchain: [stable, beta, nightly]

steps:
- name: Set up Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ matrix.toolchain }}
cargo install cargo-tarpaulin
- name: Check Rust toolchain
run: rustup toolchain list

- name: Check out code
uses: actions/checkout@v4

- name: Build
run: cargo build --verbose

- name: Test
run: cargo test --verbose

- name: Generate code coverage
run: cargo tarpaulin --out lcov
if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest'

- name: Upload code coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
if: matrix.os == 'ubuntu-latest' && matrix.toolchain == 'stable'

0 comments on commit a18fda4

Please sign in to comment.