forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.25 KB
/
crate-check.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
name: crate-check
on:
push:
branches:
- master
pull_request:
branches:
- master
paths:
- "**/Cargo.toml"
- ".github/workflows/crate-check.yml"
- "./ci/check-crates.sh"
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get commit range (push)
if: ${{ github.event_name == 'push' }}
run: |
echo "COMMIT_RANGE=${{ github.event.before }}..$GITHUB_SHA" >> $GITHUB_ENV
- name: Get commit range (pull_request)
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "COMMIT_RANGE=${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
- name: Setup Rust
shell: bash
run: |
source ci/rust-version.sh stable
rustup default $rust_stable
- name: Install toml-cli
shell: bash
run: |
cargo install toml-cli
- run: |
ci/check-crates.sh
error_reporting:
needs:
- check
if: failure() && github.event_name == 'push'
uses: ./.github/workflows/error-reporting.yml
secrets:
WEBHOOK: ${{ secrets.SLACK_ERROR_REPORTING_WEBHOOK }}