|
27 | 27 |
|
28 | 28 | - name: Install packages (Linux)
|
29 | 29 | if: runner.os == 'Linux'
|
30 |
| - uses: awalsh128/[email protected].2 |
| 30 | + uses: awalsh128/[email protected].3 |
31 | 31 | with:
|
32 | 32 | packages: libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd
|
33 | 33 | version: 1.0
|
|
63 | 63 | command: check
|
64 | 64 | args: --no-default-features --lib --all-targets
|
65 | 65 |
|
66 |
| - - name: Test doc-tests |
67 |
| - uses: actions-rs/cargo@v1 |
68 |
| - with: |
69 |
| - command: test |
70 |
| - args: --doc --all-features |
71 |
| - |
72 | 66 | - name: cargo doc --lib
|
73 | 67 | uses: actions-rs/cargo@v1
|
74 | 68 | with:
|
|
81 | 75 | command: doc
|
82 | 76 | args: --document-private-items --no-deps --all-features
|
83 | 77 |
|
84 |
| - - name: Build tests |
85 |
| - uses: actions-rs/cargo@v1 |
86 |
| - with: |
87 |
| - command: test |
88 |
| - args: --all-features --no-run |
89 |
| - |
90 |
| - - name: Run test |
91 |
| - uses: actions-rs/cargo@v1 |
92 |
| - with: |
93 |
| - command: test |
94 |
| - args: --all-features |
95 |
| - |
96 | 78 | - name: Clippy
|
97 | 79 | uses: actions-rs/cargo@v1
|
98 | 80 | with:
|
@@ -158,3 +140,35 @@ jobs:
|
158 | 140 | run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
|
159 | 141 | - name: Build
|
160 | 142 | run: cd demo && ../trunk build
|
| 143 | + |
| 144 | + # --------------------------------------------------------------------------- |
| 145 | + |
| 146 | + tests: |
| 147 | + name: Run tests |
| 148 | + # We run the tests on macOS because it will run with an actual GPU, |
| 149 | + # which is needed by the egui_kittest snapshot tests. |
| 150 | + runs-on: macos-latest |
| 151 | + |
| 152 | + steps: |
| 153 | + - uses: actions/checkout@v4 |
| 154 | + with: |
| 155 | + lfs: true |
| 156 | + - uses: dtolnay/rust-toolchain@master |
| 157 | + with: |
| 158 | + toolchain: 1.81.0 |
| 159 | + |
| 160 | + - name: Set up cargo cache |
| 161 | + uses: Swatinem/rust-cache@v2 |
| 162 | + |
| 163 | + - name: Run tests |
| 164 | + run: cargo test --all-features |
| 165 | + |
| 166 | + - name: Run doc-tests |
| 167 | + run: cargo test --all-features --doc |
| 168 | + |
| 169 | + - name: Upload artifacts |
| 170 | + uses: actions/upload-artifact@v4 |
| 171 | + if: always() |
| 172 | + with: |
| 173 | + name: test-results |
| 174 | + path: "**/tests/snapshots" |
0 commit comments