Skip to content

Commit

Permalink
Fix CI (#32)
Browse files Browse the repository at this point in the history
* fix clippy CI

* use stable toolchain

* remove backtrace feature

* try to fix coverage. Add rustfmt and editorconfig

* fix coverage

* fix coverage for good

* run rustfmt on codebase
  • Loading branch information
insipx authored Dec 3, 2020
1 parent 413b5b5 commit dd93475
Show file tree
Hide file tree
Showing 32 changed files with 4,824 additions and 5,749 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true
[*]
indent_style=tab
indent_size=tab
tab_width=4
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
max_line_length=120
insert_final_newline=true

[*.{yml,sh}]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf
23 changes: 15 additions & 8 deletions .github/workflows/clippy_check.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
on: [push]
name: Clippy check
on: [push, pull_request]
name: Clippy
jobs:
clippy_check:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1

- name: Run clippy
uses: actions-rs/cargo@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: clippy
args: -- -D warnings
39 changes: 15 additions & 24 deletions .github/workflows/grcov.yml → .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,42 @@
on: [push]

name: Code coverage with grcov
name: Code Coverage

jobs:
grcov:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout Repository
uses: actions/checkout@v1

- name: Install toolchain
- name: Install Nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Execute tests
- name: Cargo Clean
uses: actions-rs/cargo@v1
with:
command: clean

- name: Run Tests for Coverage
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off"
RUST_LOG: info

- name: Gather coverage data
id: coverage
- id: coverage
uses: actions-rs/[email protected]
with:
coveralls-token: ${{ secrets.COVERALLS_TOKEN }}

- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: ${{ steps.coverage.outputs.report }}

grcov_finalize:
runs-on: ubuntu-latest
needs: grcov
steps:
- name: Coveralls finalization
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
5 changes: 5 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
hard_tabs = true
max_width = 120
use_small_heuristics = "Max"
edition = "2018"
newline_style = "Unix"
Loading

0 comments on commit dd93475

Please sign in to comment.