File: test.yml

package info (click to toggle)
rust-comfy-table 7.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 612 kB
  • sloc: makefile: 2
file content (86 lines) | stat: -rw-r--r-- 2,776 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Tests

on:
  push:
    branches: [main]
    paths:
      - ".github/workflows/test.yml"
      - "**.rs"
      - "Cargo.toml"
      - "Cargo.lock"
  pull_request:
    branches: [main]
    paths:
      - ".github/workflows/test.yml"
      - "**.rs"
      - "Cargo.toml"
      - "Cargo.lock"

jobs:
  test:
    name: Test target ${{ matrix.target }} on ${{ matrix.os }} for ${{ matrix.toolchain }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        target:
          - x86_64-unknown-linux-gnu
          - x86_64-pc-windows-msvc
          - x86_64-apple-darwin
        toolchain: [stable, "1.74"]
        include:
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
            minimal_setup: false
          - target: wasm32-wasi
            os: ubuntu-latest
            minimal_setup: true
            toolchain: "1.74"
          - target: wasm32-wasip1
            os: ubuntu-latest
            minimal_setup: true
            toolchain: "stable"
          - target: x86_64-pc-windows-msvc
            os: windows-latest
            minimal_setup: false
          - target: x86_64-apple-darwin
            os: macos-latest
            minimal_setup: false

    # minimal_setup: This is needed for targets that don't support our dev dependencies.
    #                It also excludes the default features, i.e. [tty].
    #                For instance, "wasm32-wasi" is such a target.
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Setup Rust toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          targets: ${{ matrix.target }}
          toolchain: ${{ matrix.toolchain }}
          components: rustfmt, clippy

      - name: cargo build
        run: cargo build --target=${{ matrix.target }}
        if: ${{ !matrix.minimal_setup }}

      - name: cargo test
        run: cargo test --target=${{ matrix.target }} --features=integration_test
        if: ${{ !matrix.minimal_setup }}

      - name: cargo test without default features
        run: cargo test --target=${{ matrix.target }} --tests --no-default-features
        if: ${{ !matrix.minimal_setup }}

      - name: cargo test with crossterm re-export
        run: cargo test --target=${{ matrix.target }} --features=integration_test,reexport_crossterm
        if: ${{ !matrix.minimal_setup }}

      - name: cargo test with custom_styling
        run: cargo test --target=${{ matrix.target }} --features=integration_test,custom_styling
        if: ${{ !matrix.minimal_setup }}

      - name: cargo build without default features and without dev dependencies
        run: cargo build --release --target=${{ matrix.target }} --no-default-features
        if: ${{ matrix.minimal_setup }}