name: Tests
on: [push]
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Update Rust to latest
run: ~/.cargo/bin/rustup update
- name: Create filesystems
run: scripts/make-filesystems.sh ext2 ext4 xfs btrfs ntfs fat zfs
- name: Run tests on ext2
run: cargo test
working-directory: /fs/ext2/src
env:
XCP_TEST_FS: ext2
if: always()
- name: Run tests on ext4
run: cargo test
working-directory: /fs/ext4/src
env:
XCP_TEST_FS: ext4
if: always()
- name: Run tests on XFS
run: cargo test
working-directory: /fs/xfs/src
env:
XCP_TEST_FS: xfs
if: always()
- name: Run tests on btrfs
run: cargo test
working-directory: /fs/btrfs/src
env:
XCP_TEST_FS: btrfs
if: always()
- name: Run tests on ntfs
run: cargo test
working-directory: /fs/ntfs/src
env:
XCP_TEST_FS: ntfs
if: always()
- name: Run tests on fat
run: cargo test
working-directory: /fs/fat/src
env:
XCP_TEST_FS: fat
if: always()
- name: Run tests on ZFS
run: cargo test
working-directory: /fs/zfs/src
env:
XCP_TEST_FS: zfs
if: always()
expensive:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Update Rust to latest
run: ~/.cargo/bin/rustup update
- name: Run expensive tests
run: ~/.cargo/bin/cargo test -- --ignored
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash /dev/stdin -y
- name: Update Rust (installer may lag behind)
run: ~/.cargo/bin/rustup update
- name: Run tests
run: ~/.cargo/bin/cargo test --no-default-features
- name: Run expensive tests
run: ~/.cargo/bin/cargo test --no-default-features -- --ignored