| 1 | name: ci |
| 2 | on: |
| 3 | pull_request: |
| 4 | push: |
| 5 | branches: |
| 6 | - master |
| 7 | schedule: |
| 8 | - cron: '00 01 * * *' |
| 9 | jobs: |
| 10 | test: |
| 11 | name: test |
| 12 | runs-on: ${{ matrix.os }} |
| 13 | strategy: |
| 14 | matrix: |
| 15 | build: |
| 16 | - pinned |
| 17 | - stable |
| 18 | - beta |
| 19 | - nightly |
| 20 | - macos |
| 21 | - win-msvc |
| 22 | - win-gnu |
| 23 | include: |
| 24 | - build: pinned |
| 25 | os: ubuntu-latest |
| 26 | rust: 1.67.0 |
| 27 | - build: stable |
| 28 | os: ubuntu-latest |
| 29 | rust: stable |
| 30 | - build: beta |
| 31 | os: ubuntu-latest |
| 32 | rust: beta |
| 33 | - build: nightly |
| 34 | os: ubuntu-latest |
| 35 | rust: nightly |
| 36 | - build: macos |
| 37 | os: macos-latest |
| 38 | rust: stable |
| 39 | - build: win-msvc |
| 40 | os: windows-latest |
| 41 | rust: stable |
| 42 | - build: win-gnu |
| 43 | os: windows-latest |
| 44 | rust: stable-x86_64-gnu |
| 45 | steps: |
| 46 | - name: Checkout repository |
| 47 | uses: actions/checkout@v3 |
| 48 | - name: Install Rust |
| 49 | uses: dtolnay/rust-toolchain@master |
| 50 | with: |
| 51 | toolchain: ${{ matrix.rust }} |
| 52 | - run: cargo build --verbose |
| 53 | - run: cargo doc --verbose |
| 54 | - run: cargo test --verbose |
| 55 | - run: cargo test --verbose --features ansi_formatting |
| 56 | - run: cargo build --verbose --manifest-path tabwriter-bin/Cargo.toml |
| 57 | |
| 58 | rustfmt: |
| 59 | name: rustfmt |
| 60 | runs-on: ubuntu-latest |
| 61 | steps: |
| 62 | - name: Checkout repository |
| 63 | uses: actions/checkout@v3 |
| 64 | - name: Install Rust |
| 65 | uses: dtolnay/rust-toolchain@master |
| 66 | with: |
| 67 | toolchain: stable |
| 68 | components: rustfmt |
| 69 | - name: Install rustfmt |
| 70 | run: rustup component add rustfmt |
| 71 | - name: Check formatting |
| 72 | run: | |
| 73 | cargo fmt -- --check |
| 74 | - name: Check formatting of tabwriter-bin |
| 75 | run: | |
| 76 | cargo fmt --manifest-path tabwriter-bin/Cargo.toml -- --check |