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: dtolnay/rust-toolchain@master 19 with: 20 toolchain: ${{matrix.rust}} 21 - run: cargo test 22 - run: cargo test --no-default-features 23 - run: cargo test --features span-locations 24 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test 25 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features 26 27 nightly: 28 name: Rust nightly 29 runs-on: ubuntu-latest 30 steps: 31 - uses: actions/checkout@v2 32 - uses: dtolnay/rust-toolchain@nightly 33 - run: cargo test 34 - run: cargo test --no-default-features 35 - run: cargo test --no-default-features -- --ignored # run the ignored test to make sure the `proc-macro` feature is disabled 36 - run: cargo test --features span-locations 37 - run: cargo test --manifest-path tests/ui/Cargo.toml 38 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test 39 - run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features 40 - run: RUSTFLAGS='-Z allow-features=' cargo test 41 - run: cargo update -Z minimal-versions && cargo build 42 43 webassembly: 44 name: WebAssembly 45 runs-on: ubuntu-latest 46 steps: 47 - uses: actions/checkout@v2 48 - uses: dtolnay/rust-toolchain@nightly 49 with: 50 target: wasm32-unknown-unknown 51 - run: cargo test --target wasm32-unknown-unknown --no-run 52 53 clippy: 54 name: Clippy 55 runs-on: ubuntu-latest 56 if: github.event_name != 'pull_request' 57 steps: 58 - uses: actions/checkout@v2 59 - uses: dtolnay/rust-toolchain@clippy 60 - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic 61 - run: cargo clippy --tests --all-features -- -Dclippy::all -Dclippy::pedantic 62 63 outdated: 64 name: Outdated 65 runs-on: ubuntu-latest 66 if: github.event_name != 'pull_request' 67 steps: 68 - uses: actions/checkout@v2 69 - uses: dtolnay/install@cargo-outdated 70 - run: cargo outdated --exit-code 1 71