File: test.yml

package info (click to toggle)
rust-blanket 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 548 kB
  • sloc: makefile: 2
file content (59 lines) | stat: -rw-r--r-- 1,415 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
48
49
50
51
52
53
54
55
56
57
58
59
name: Test

on:
  - push
  - pull_request

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust-toolchain:
          - stable
          - beta
          - nightly
    steps:
    - name: Checkout code
      uses: actions/checkout@v1
    - name: Setup Rust ${{ matrix.rust-toolchain }}
      uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: ${{ matrix.rust-toolchain }}
        override: true
    - name: Setup cache for cargo
      uses: actions/cache@v2
      with:
        path: target
        key: ${{ runner.os }}-cargo-${{ matrix.rust-toolchain }}
    - name: Check code
      uses: actions-rs/cargo@v1
      with:
        command: check
    - name: Measure code coverage
      uses: actions-rs/tarpaulin@v0.1
      with:
        version: '0.16.0'
        args: '--lib -v --out Xml --ciserver github-actions'
    - name: Upload coverage statistics
      run: curl -SsL "https://codecov.io/bash" | bash -s


  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v1
      - name: Setup Rust stable
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: rustfmt
      - name: Check code format
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check