Replace Travis by Github

This commit is contained in:
Ferran Basora 2021-07-21 14:23:39 +00:00
parent a8cf7490d1
commit 54ab8d847a
3 changed files with 52 additions and 23 deletions

14
.github/workflows/audit.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,8 +1,45 @@
name: Rust
on: [push]
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Tarpaulin
uses: actions-rs/install@v0.1
with:
crate: cargo-tarpaulin
version: 0.18.0
use-tool-cache: true
- uses: actions/checkout@v2
- name: Format
run: cargo fmt --all -- --check
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Coverage
run: cargo tarpaulin -o Lcov --output-dir ./coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build-mac:
runs-on: macos-latest

View File

@ -1,22 +0,0 @@
language: rust
cache: cargo
dist: trusty
os:
- linux
- osx
rust:
# FIXME: Try again when component 'rustfmt' is available
# - nightly
- stable
before_script:
- rustup component add rustfmt
- cargo install --force cargo-audit
- cargo generate-lockfile
script:
- cargo fmt --all -- --check
- cargo build
- cargo test
- cargo audit