diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d9a6a7e7..91587401b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,31 +25,52 @@ jobs: key: cargo-${{ matrix.rust }} - name: Rust toolchain - uses: actions-rs/toolchain@v1 + uses: hecrj/setup-rust-action@v1 with: - toolchain: ${{ matrix.rust }} - override: true + rust-version: ${{ matrix.rust }} - name: Install system dependencies run: sudo apt-get install libxkbcommon-dev libwayland-dev - - name: Test lib no features - uses: actions-rs/cargo@v1 + - name: Check lib no features + run: cargo check --no-default-features + + - name: Check full features + run: cargo check --all-features + + test: + strategy: + fail-fast: false + matrix: + rust: ['stable', 'beta'] + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Cargo cache + uses: actions/cache@v1 with: - command: test - args: --no-default-features --lib + path: ~/.cargo + key: cargo-${{ matrix.rust }} - - name: Test doc no features - uses: actions-rs/cargo@v1 + - name: Rust toolchain + uses: hecrj/setup-rust-action@v1 with: - command: test - args: --no-default-features --doc + rust-version: ${{ matrix.rust }} + + - name: Install system dependencies + run: sudo apt-get install libxkbcommon-dev libwayland-dev + + - name: Test lib no features + run: cargo test --no-default-features --lib + + - name: Test doc no features + run: cargo test --no-default-features --doc - name: Test full features - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features + run: cargo test --all-features lint: runs-on: ubuntu-latest @@ -59,7 +80,7 @@ jobs: uses: actions/checkout@v2 - name: Rust toolchain - uses: actions-rs/toolchain@v1 + uses: hecrj/setup-rust-action@v1 with: toolchain: stable override: true