summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorMélanie Chauvel <perso@hack-libre.org>2021-07-31 21:57:48 +0200
committerMélanie Chauvel <perso@hack-libre.org>2021-08-09 16:02:31 +0200
commitc24afe3a084133ab49f1cbacc87528183e64f77a (patch)
treec0dd95b6a37458c64ce030e97b68b2af463cdcf5 /.github
parent049f766d1d5f7fdcf4a979e8474ac4c76829aad2 (diff)
use GitHub Actions instead of Travis CI
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/unit-tests.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
new file mode 100644
index 0000000..4071b3a
--- /dev/null
+++ b/.github/workflows/unit-tests.yml
@@ -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