-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (48 loc) · 1.68 KB
/
ci_action.yml
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
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
on: [push]
name: CI
jobs:
ci:
name: Build, test, check and lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 1
# builds, tests and checks the formatting
- uses: rust-lang/simpleinfra/github-actions/simple-ci@master
with:
check_fmt: true
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
# ##########################################################
# # Slack Notification
# ##########################################################
# slack:
# name: Slack
# needs: ci # set needs only last job except this job
# runs-on: ubuntu-latest
# if: always() # set always
# steps:
# # run this action to get workflow conclusion
# # You can get conclusion via env (env.WORKFLOW_CONCLUSION)
# - uses: technote-space/workflow-conclusion-action@v1
# - uses: 8398a7/action-slack@v2
# with:
# # status: ${{ env.WORKFLOW_CONCLUSION }} # neutral, success, cancelled, timed_out, failure
# status: failure
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.CI_SLACK_WEBHOOK_URL }}
# if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure