Skip to content

Merge pull request #33 from Tomasz-Kluczkowski/issue-7/docs-google-ca… #43

Merge pull request #33 from Tomasz-Kluczkowski/issue-7/docs-google-ca…

Merge pull request #33 from Tomasz-Kluczkowski/issue-7/docs-google-ca… #43

Workflow file for this run

name: Lint - Test - Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Linting checks
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Check formatting of code
run: cargo fmt --all -- --check
- name: Check code suggestions with cargo clippy
run: cargo clippy -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustup component add llvm-tools-preview
- run: cargo install grcov
- run: |
export RUSTFLAGS="-Cinstrument-coverage"
export LLVM_PROFILE_FILE="cargo-tests-%p-%m.profraw"
cargo test --workspace
- run: |
grcov . --binary-path ./target/debug/deps/ \
--source-dir . \
--output-types cobertura \
--branch \
--ignore-not-existing \
--ignore **/tests.rs \
--ignore "/*" \
--output-path .
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: Tomasz-Kluczkowski/slack-gcal-sync
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --workspace