mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Update CI for Rust bors
This commit is contained in:
parent
ac736dc667
commit
8b60bf6764
23
.github/workflows/ci.yaml
vendored
23
.github/workflows/ci.yaml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Please make sure that the `needs` fields for both `end-success` and `end-failure`
|
||||||
|
# are updated when adding new jobs!
|
||||||
|
|
||||||
name: CI
|
name: CI
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -6,6 +9,8 @@ on:
|
|||||||
- master
|
- master
|
||||||
- staging
|
- staging
|
||||||
- trying
|
- trying
|
||||||
|
- auto
|
||||||
|
- try
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
@ -150,3 +155,21 @@ jobs:
|
|||||||
|
|
||||||
- run: npm run package --scripts-prepend-node-path
|
- run: npm run package --scripts-prepend-node-path
|
||||||
working-directory: ./editors/code
|
working-directory: ./editors/code
|
||||||
|
|
||||||
|
end-success:
|
||||||
|
name: bors build finished
|
||||||
|
if: github.event.pusher.name == 'bors' && success()
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [rust, rust-cross, typescript]
|
||||||
|
steps:
|
||||||
|
- name: Mark the job as successful
|
||||||
|
run: exit 0
|
||||||
|
|
||||||
|
end-failure:
|
||||||
|
name: bors build finished
|
||||||
|
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [rust, rust-cross, typescript]
|
||||||
|
steps:
|
||||||
|
- name: Mark the job as a failure
|
||||||
|
run: exit 1
|
||||||
|
@ -146,7 +146,7 @@ fn check_cargo_toml(path: &Path, text: String) {
|
|||||||
fn check_merge_commits() {
|
fn check_merge_commits() {
|
||||||
let sh = &Shell::new().unwrap();
|
let sh = &Shell::new().unwrap();
|
||||||
|
|
||||||
let bors = cmd!(sh, "git rev-list --merges --author 'bors\\[bot\\]' HEAD~19..").read().unwrap();
|
let bors = cmd!(sh, "git rev-list --merges --author 'bors' HEAD~19..").read().unwrap();
|
||||||
let all = cmd!(sh, "git rev-list --merges HEAD~19..").read().unwrap();
|
let all = cmd!(sh, "git rev-list --merges HEAD~19..").read().unwrap();
|
||||||
if bors != all {
|
if bors != all {
|
||||||
panic!(
|
panic!(
|
||||||
|
@ -66,7 +66,7 @@ If `cargo test` passes locally, that's a good sign that CI will be green as well
|
|||||||
The only exception is that some long-running tests are skipped locally by default.
|
The only exception is that some long-running tests are skipped locally by default.
|
||||||
Use `env RUN_SLOW_TESTS=1 cargo test` to run the full suite.
|
Use `env RUN_SLOW_TESTS=1 cargo test` to run the full suite.
|
||||||
|
|
||||||
We use bors-ng to enforce the [not rocket science](https://graydon2.dreamwidth.org/1597.html) rule.
|
We use bors to enforce the [not rocket science](https://graydon2.dreamwidth.org/1597.html) rule.
|
||||||
|
|
||||||
## Launching rust-analyzer
|
## Launching rust-analyzer
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user