mirror of https://github.com/boa-dev/boa.git
Browse Source
This Pull Request updates some of our CI config and adds config for bors. It changes the following: - remove `cargo check` from CI (`cargo test` should be enough) - change back to `cargo tarpaulin` on Linux to get coverage information - simplify some of the CI steps' names - add workflow for bors ##### Working with bors It's setup so that we need 2 approvals before we can merge like we discussed in Discord. After the second approval we can write a comment with `bors r+` so that the merge is tested. bors will only run if `test`, `rustfmt`, `clippy`, `examples` and `doc` are all running error free in the PR's branch. It will then run them again in a `staging` branch that is the equivalent of merging the PR on `main`. Another option we can consider is `up_to_date_approvals`, so that new commits make previous approvals not count. The bors reference can be found here: https://bors.tech/documentation/pull/1686/head
João Borges
3 years ago
3 changed files with 217 additions and 73 deletions
@ -0,0 +1,181 @@ |
|||||||
|
name: bors |
||||||
|
|
||||||
|
on: |
||||||
|
push: |
||||||
|
branches: |
||||||
|
- staging |
||||||
|
- trying |
||||||
|
|
||||||
|
jobs: |
||||||
|
test_on_linux: |
||||||
|
name: Tests on Linux |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
- name: Cache cargo |
||||||
|
uses: actions/cache@v2.1.6 |
||||||
|
with: |
||||||
|
path: | |
||||||
|
target |
||||||
|
~/.cargo/git |
||||||
|
~/.cargo/registry |
||||||
|
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} |
||||||
|
- uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: test |
||||||
|
args: -v |
||||||
|
test_vm_on_linux: |
||||||
|
name: Tests on Linux with vm enabled |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
- name: Cache cargo |
||||||
|
uses: actions/cache@v2.1.6 |
||||||
|
with: |
||||||
|
path: | |
||||||
|
target |
||||||
|
~/.cargo/git |
||||||
|
~/.cargo/registry |
||||||
|
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} |
||||||
|
- uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: test |
||||||
|
args: ---package Boa --lib --features=vm -- vm --nocapture |
||||||
|
|
||||||
|
test_on_windows: |
||||||
|
name: Tests on Windows |
||||||
|
runs-on: windows-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
- name: Cache cargo |
||||||
|
uses: actions/cache@v2.1.6 |
||||||
|
with: |
||||||
|
path: target |
||||||
|
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} |
||||||
|
- uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: test |
||||||
|
args: -v |
||||||
|
|
||||||
|
test_on_macos: |
||||||
|
name: Tests on MacOS |
||||||
|
runs-on: macos-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
- uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: test |
||||||
|
args: -v |
||||||
|
|
||||||
|
fmt: |
||||||
|
name: Rustfmt |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
components: rustfmt |
||||||
|
- uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: fmt |
||||||
|
args: --all -- --check |
||||||
|
|
||||||
|
clippy: |
||||||
|
name: Clippy |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
components: clippy |
||||||
|
- name: Cache cargo |
||||||
|
uses: actions/cache@v2.1.6 |
||||||
|
with: |
||||||
|
path: | |
||||||
|
target |
||||||
|
~/.cargo/git |
||||||
|
~/.cargo/registry |
||||||
|
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} |
||||||
|
- uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: clippy |
||||||
|
args: -- --verbose |
||||||
|
|
||||||
|
examples: |
||||||
|
name: Examples |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
- name: Cache cargo |
||||||
|
uses: actions/cache@v2.1.6 |
||||||
|
with: |
||||||
|
path: | |
||||||
|
target |
||||||
|
~/.cargo/git |
||||||
|
~/.cargo/registry |
||||||
|
key: ${{ runner.os }}-cargo-examples-${{ hashFiles('**/Cargo.lock') }} |
||||||
|
- name: Build examples |
||||||
|
uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: build |
||||||
|
args: --examples -v |
||||||
|
- name: Run example classes |
||||||
|
uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: run |
||||||
|
args: --example classes |
||||||
|
|
||||||
|
doc: |
||||||
|
name: Documentation |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v2.3.5 |
||||||
|
- uses: actions-rs/toolchain@v1.0.7 |
||||||
|
with: |
||||||
|
toolchain: stable |
||||||
|
override: true |
||||||
|
profile: minimal |
||||||
|
- name: Cache cargo |
||||||
|
uses: actions/cache@v2.1.6 |
||||||
|
with: |
||||||
|
path: | |
||||||
|
target |
||||||
|
~/.cargo/git |
||||||
|
~/.cargo/registry |
||||||
|
key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }} |
||||||
|
- name: Generate documentation |
||||||
|
uses: actions-rs/cargo@v1 |
||||||
|
with: |
||||||
|
command: doc |
||||||
|
args: -v --document-private-items |
@ -0,0 +1,26 @@ |
|||||||
|
# docs https://bors.tech/documentation/ |
||||||
|
status = [ |
||||||
|
"Tests on Linux", |
||||||
|
"Tests on Linux with vm enabled", |
||||||
|
"Tests on Windows", |
||||||
|
"Tests on MacOS", |
||||||
|
"Rustfmt", |
||||||
|
"Clippy", |
||||||
|
"Examples", |
||||||
|
"Documentation", |
||||||
|
] |
||||||
|
pr_status = [ |
||||||
|
"Tests on Linux", |
||||||
|
"Tests on Linux with vm enabled", |
||||||
|
"Tests on Windows", |
||||||
|
"Tests on MacOS", |
||||||
|
"Rustfmt", |
||||||
|
"Clippy", |
||||||
|
"Examples", |
||||||
|
"Documentation", |
||||||
|
] |
||||||
|
block_labels = [ "blocked" ] |
||||||
|
required_approvals = 2 |
||||||
|
delete_merged_branches = true |
||||||
|
use_squash_merge = true |
||||||
|
update_base_for_deletes = true |
Loading…
Reference in new issue