-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc2c553
commit 7aaca05
Showing
7 changed files
with
200 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @mobilecoinfoundation/coredev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 25 | ||
commit-message: | ||
prefix: "chore(deps)" | ||
reviewers: | ||
- "mobilecoinfoundation/coredev" | ||
|
||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: "chore(deps)" | ||
reviewers: | ||
- "mobilecoinfoundation/coredev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,33 @@ on: | |
- 'main' | ||
pull_request: | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: "-Dwarnings" | ||
CARGO_UNSTABLE_SPARSE_REGISTRY: true | ||
|
||
jobs: | ||
buf-lint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: bufbuild/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
- uses: bufbuild/buf-lint-action@v1 | ||
|
||
rustfmt: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- uses: r7kamura/rust-problem-matchers@v1 | ||
- name: cargo fmt | ||
working-directory: ./crates | ||
run: cargo fmt --all -- --check | ||
|
||
markdown-lint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
@@ -23,12 +42,156 @@ jobs: | |
with: | ||
globs: "**/*.md" | ||
|
||
deny: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- "rustfmt" | ||
- "markdown-lint" | ||
strategy: | ||
matrix: | ||
checks: | ||
- advisories | ||
- bans licenses sources | ||
# Prevent sudden announcement of a new advisory from failing ci: | ||
continue-on-error: ${{ matrix.checks == 'advisories' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: --manifest-path crates/Cargo.toml check ${{ matrix.checks }} | ||
|
||
sort: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- "rustfmt" | ||
- "markdown-lint" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: cargo install cargo-sort | ||
- name: cargo sort | ||
working-directory: ./crates | ||
run: cargo sort --workspace --check >/dev/null | ||
|
||
clippy: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- "rustfmt" | ||
- "markdown-lint" | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
# Prevent beta clippy warnings from causing CI failure | ||
continue-on-error: ${{ matrix.rust == 'beta' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
components: clippy | ||
- uses: r7kamura/rust-problem-matchers@v1 | ||
- name: cargo clippy | ||
working-directory: ./crates | ||
run: cargo +${{ matrix.rust }} clippy --all --all-features -- -D warnings | ||
|
||
build: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- "rustfmt" | ||
- "markdown-lint" | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly-2023-01-04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- uses: r7kamura/rust-problem-matchers@v1 | ||
- name: cargo build | ||
working-directory: ./crates | ||
run: cargo +${{ matrix.rust }} build --release | ||
|
||
test: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- "rustfmt" | ||
- "markdown-lint" | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly-2023-01-04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- uses: r7kamura/rust-problem-matchers@v1 | ||
- name: cargo test | ||
working-directory: ./crates | ||
run: cargo +${{ matrix.rust }} test --release | ||
|
||
doc: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- "rustfmt" | ||
- "markdown-lint" | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
# Prevent beta docs warnings from causing CI failure | ||
continue-on-error: ${{ matrix.rust == 'beta' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- uses: r7kamura/rust-problem-matchers@v1 | ||
- name: cargo doc | ||
working-directory: ./crates | ||
run: cargo +${{ matrix.rust }} doc --release --no-deps | ||
|
||
coverage: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- "rustfmt" | ||
- "markdown-lint" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
- uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: cargo llvm-cov | ||
working-directory: ./crates | ||
run: cargo llvm-cov --workspace --lcov --output-path lcov.info | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: crates/lcov.info | ||
|
||
notify: | ||
runs-on: ubuntu-latest | ||
if: ${{always()}} && ${{failure()}} && ${{ github.event_name }} == 'push' | ||
if: failure() && ${{ github.event_name }} == 'push' | ||
needs: | ||
- buf-lint | ||
- rustfmt | ||
- markdown-lint | ||
- deny | ||
- sort | ||
- clippy | ||
- build | ||
- test | ||
- doc | ||
- coverage | ||
steps: | ||
- name: Notify Discord on failure | ||
uses: sarisia/actions-status-discord@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,11 @@ jobs: | |
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
configuration-path: .github/triage-labeler.yaml | ||
enable-versioned-regex: 0 | ||
|
||
add-to-project: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
github-token: "${{ secrets.ADD_TO_PROJECT_PAT }}" | ||
project-url: https://github.com/orgs/mobilecoinfoundation/projects/5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,14 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
add-to-project: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
github-token: "${{ secrets.ADD_TO_PROJECT_PAT }}" | ||
project-url: https://github.com/orgs/mobilecoinfoundation/projects/5 | ||
|
||
size-label: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters