Bump h2 from 0.3.2 to 0.3.21 #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
paths: | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
- 'Dockerfile' | |
- 'src/**' | |
- '.github/**' | |
name: Continuous integration | |
jobs: | |
cancel-previous: | |
name: Cancel Previous Runs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel actions | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup git credentials | |
uses: fusion-engineering/setup-git-credentials@v2 | |
with: | |
credentials: ${{secrets.GIT_USER_CREDENTIALS}} | |
- name: Setup toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install rustfmt | |
run: rustup component add rustfmt | |
- name: Run check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
needs: [fmt] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup git credentials | |
uses: fusion-engineering/setup-git-credentials@v2 | |
with: | |
credentials: ${{secrets.GIT_USER_CREDENTIALS}} | |
- name: Setup toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
test_coverage: | |
name: Test & Coverage | |
runs-on: ubuntu-latest | |
needs: [fmt, clippy] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup git credentials | |
uses: fusion-engineering/setup-git-credentials@v2 | |
with: | |
credentials: ${{secrets.GIT_USER_CREDENTIALS}} | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Initiate kafka | |
run: ./scripts/init_kafka.sh | |
- name: Install tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: Generate coverage | |
run: cargo tarpaulin --out Xml | |
- name: Upload to codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
fail_ci_if_error: true |