File: ci.yml

package info (click to toggle)
rust-handsome-logger 0.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 200 kB
  • sloc: makefile: 4
file content (47 lines) | stat: -rw-r--r-- 1,206 bytes parent folder | download
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
name: Build and test

on:
  push:
  pull_request:

jobs:
  full_ci:
    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest, windows-latest ]
        toolchain: [ stable, 1.81.0 ]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4

      - name: Setup rust version
        run: rustup default ${{ matrix.toolchain }}

      - name: Clippy fmt
        run: |
          cargo fmt -- --check
        if: ${{ matrix.type == 'stable' }}

      - name: Cargo check
        run: |
          cargo check
          cargo check --all-features

      - name: Cargo check examples
        if: ${{ matrix.os == 'ubuntu-latest' }}
        run: |
          for project in examples/*; do cd $project; cargo check; cd -; done

      - name: Clippy pedantic
        run: |
          cargo clippy -- -W clippy::pedantic -A clippy::module-name-repetitions -A clippy::missing-errors-doc -A clippy::inline_always -A clippy::wildcard-imports
        if: ${{ matrix.type == 'stable' }}

      - name: Test
        run: |
          cargo test --no-fail-fast -- --nocapture
          cargo test --all-features --no-fail-fast -- --nocapture

      - name: Doc
        run: |
          cargo doc