Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create github actions #1

Merged
merged 3 commits into from
Feb 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Rust

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:

codestyle:
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v2
with:
components: rustfmt
- uses: actions/checkout@v3
- run: cargo fmt --check

lint:
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v2
with:
components: clippy
- uses: actions/checkout@v3
- run: cargo clippy --all-targets --all-features -- -D warnings

compile:
runs-on: ubuntu-latest
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v2
- uses: actions/checkout@master
- run: cargo check --all-targets --all-features

docs:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: "-Dwarnings"
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v2
- uses: actions/checkout@master
- run: cargo doc --document-private-items --no-deps --workspace --all-features

test:
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: cargo test --all-features

test-coverage:
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
- name: Install Tarpaulin
uses: actions-rs/[email protected]
with:
crate: cargo-tarpaulin
version: 0.27.3
use-tool-cache: true
- name: Checkout
uses: actions/checkout@v3
- name: Coverage
run: cargo tarpaulin -o Lcov --output-dir ./coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
files: ./coverage/lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
slug: takaebato/sql-insight
Loading