Skip to content

Commit

Permalink
ci: change from circle to github actions (#144)
Browse files Browse the repository at this point in the history
* ci: replace circleci with github actions

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* fix yaml for audit

* add cargo fmt

* test coverage upload

* change path to coverage file

* remove circle

* test cricle

* fix config grcov

* fix config grcov

* Update .github/workflows/rust.yml

Co-Authored-By: Tony Arcieri <bascule@gmail.com>

* test GA firing

* add cleanup of runners

* audit try fire

* add cronjob and cache

Co-authored-by: Tony Arcieri <bascule@gmail.com>
  • Loading branch information
tac0turtle and tarcieri committed Mar 15, 2020
1 parent 471ac8f commit 00f4390
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 147 deletions.
147 changes: 0 additions & 147 deletions .circleci/config.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/actions-rs/grcov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
branch: true
ignore-not-existing: true
llvm: true
output-type: lcov
output-file: ./lcov.info
prefix-dir: /home/user/build/
22 changes: 22 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Audit-Check
on:
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
schedule:
- cron: "0 0 * * *"

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo bin
uses: actions/cache@v1
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-audit
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
81 changes: 81 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Rust
on: [pull_request]
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

test-stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --all --all-targets
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast

test-nightly-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: clean
- 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 -Zno-landing-pads"
- uses: actions-rs/grcov@v0.1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{ steps.coverage.outputs.report }}
yml: ./codecov.yml
fail_ci_if_error: true

0 comments on commit 00f4390

Please sign in to comment.