File: ci.yml

package info (click to toggle)
rust-pp-rs 0.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 244 kB
  • sloc: makefile: 4
file content (53 lines) | stat: -rw-r--r-- 1,331 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
name: pipeline
on: [push, pull_request]

jobs:
  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: clippy, rustfmt
      - run: cargo fmt --version
      - uses: actions-rs/cargo@v1
        name: Format
        with:
          command: fmt
          args: --all -- --check
      - run: cargo clippy --version
      - uses: actions-rs/cargo@v1
        name: Clippy
        with:
          command: clippy
          args: -- -D warnings

  build:
    name: Build and test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions-rs/cargo@v1
        name: Test (and build debug)
        with:
          command: test
      - uses: actions-rs/cargo@v1
        name: Build release
        with:
          command: build
          args: --release
      - name: Publish to crates.io
        if: ${{ startsWith(github.ref, 'refs/tags') }}
        uses: actions-rs/cargo@v1
        with:
          command: publish
          args: --token ${{ secrets.CRATES_IO_TOKEN }}