use GitHub Actions instead of Travis CI

This commit is contained in:
Mélanie Chauvel 2021-07-31 21:57:48 +02:00
parent 049f766d1d
commit c24afe3a08
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