1name: CI 2 3on: 4 push: 5 pull_request: 6 schedule: [cron: "40 1 * * *"] 7 8jobs: 9 test: 10 name: Rust ${{ matrix.rust }} 11 runs-on: ubuntu-latest 12 strategy: 13 fail-fast: false 14 matrix: 15 rust: [1.31.0, stable, beta] 16 steps: 17 - uses: actions/checkout@v2 18 - uses: actions-rs/toolchain@v1 19 with: 20 toolchain: ${{ matrix.rust }} 21 profile: minimal 22 override: true 23 - run: cargo test 24 - run: cargo test --no-default-features 25 - run: cargo test --features span-locations 26 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test 27 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features 28 29 nightly: 30 name: Rust nightly 31 runs-on: ubuntu-latest 32 steps: 33 - uses: actions/checkout@v2 34 - uses: actions-rs/toolchain@v1 35 with: 36 toolchain: nightly 37 profile: minimal 38 override: true 39 - run: cargo test 40 - run: cargo test --no-default-features 41 - run: cargo test --no-default-features -- --ignored # run the ignored test to make sure the `proc-macro` feature is disabled 42 - run: cargo test --features span-locations 43 - run: cargo test --manifest-path tests/ui/Cargo.toml 44 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test 45 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features 46 - run: RUSTFLAGS='-Z allow-features=' cargo test 47 - run: cargo update -Z minimal-versions && cargo build 48 49 webassembly: 50 name: WebAssembly 51 runs-on: ubuntu-latest 52 steps: 53 - uses: actions/checkout@v2 54 - uses: actions-rs/toolchain@v1 55 with: 56 toolchain: nightly 57 target: wasm32-unknown-unknown 58 profile: minimal 59 override: true 60 - run: cargo test --target wasm32-unknown-unknown --no-run 61 62 clippy: 63 name: Clippy 64 runs-on: ubuntu-latest 65 steps: 66 - uses: actions/checkout@v2 67 - uses: actions-rs/toolchain@v1 68 with: 69 toolchain: nightly 70 profile: minimal 71 override: true 72 components: clippy 73 - run: cargo clippy -- -Dclippy::all 74