Skip to content

Commit

Permalink
Add workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaevan89 committed Dec 13, 2021
1 parent 18e510f commit 264431a
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/config/grcov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
output-type: html
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Main

on:
push:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Setup enviroment
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'

- name: Get grcov
id: coverage
uses: actions-rs/[email protected]
with:
config: .github/config/grcov.yml

- name: Copy coverage results
run: cp -R ${{ steps.coverage.outputs.report }} ./.github/reports

- name: Commit code coverage report
uses: EndBug/add-and-commit@v5
with:
author_name: Github actions
author_email: [email protected]
message: "Update report"
add: .github/reports/badges/plastic.svg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on:
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v2

- name: Build
run: cargo build

- name: Run tests
run: cargo test --verbose

0 comments on commit 264431a

Please sign in to comment.