Merge pull request #928 from ariasuni/use-github-actions

use GitHub Actions instead of Travis CI
This commit is contained in:
Mélanie Chauvel 2021-08-09 16:05:21 +02:00 committed by GitHub
commit 69d5e1fc11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 19 deletions

54
.github/workflows/unit-tests.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: Unit tests
on:
push:
branches: [ master ]
paths:
- '.github/workflows/*'
- 'src/**'
- 'Cargo.*'
- build.rs
pull_request:
branches: [ master ]
paths:
- '.github/workflows/*'
- 'src/**'
- 'Cargo.*'
- build.rs
env:
CARGO_TERM_COLOR: always
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [1.48.0, stable, beta, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Install cargo-hack
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-hack
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: hack
args: test --feature-powerset

View File

@ -1,19 +0,0 @@
language: rust
rust:
- 1.45.2
- stable
- beta
- nightly
jobs:
fast_finish: true
allow_failures:
- rust: nightly
include:
- name: 'Rust: test with all features'
rust: stable
install:
- cargo install cargo-hack
script:
- cargo hack test --feature-powerset