-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: renamed crate to near-workspaces to avoid confusion with C…
…argo workspaces; imports should now use `near_workspaces` instead of just `workspaces` (#318)
- Loading branch information
Showing
35 changed files
with
154 additions
and
111 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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
name: Workspace Checks & Tests | ||
name: Test & Release | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: | ||
push: | ||
|
@@ -7,33 +11,46 @@ on: | |
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: '-D warnings' | ||
CARGO_INCREMENTAL: 0 | ||
RUST_BACKTRACE: short | ||
|
||
jobs: | ||
check: | ||
name: Clippy and fmt | ||
runs-on: ubuntu-latest | ||
clippy: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
- uses: Swatinem/rust-cache@v1 | ||
- name: Check Formatting | ||
run: cargo fmt -- --check | ||
- name: Check Clippy | ||
run: cargo clippy --tests -- -Dclippy::all | ||
- uses: actions/checkout@v4 | ||
- name: Run clippy | ||
run: cargo clippy --benches -- -D clippy::all | ||
|
||
cargo-fmt: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run cargo fmt | ||
run: cargo fmt --check | ||
|
||
# there're sometimes warnings, which signal, that the generated doc | ||
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being | ||
# generated at release time altogether. | ||
cargo-doc: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: run cargo doc | ||
run: RUSTDOCFLAGS="-D warnings" cargo doc | ||
|
||
test: | ||
needs: check | ||
needs: cargo-fmt | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest] | ||
toolchain: [stable] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "${{ matrix.toolchain }}" | ||
|
@@ -49,3 +66,22 @@ jobs: | |
run: cargo check --verbose | ||
- name: Run tests with unstable features | ||
run: NEAR_RPC_TIMEOUT_SECS=100 cargo test --verbose --features unstable | ||
|
||
release-plz: | ||
runs-on: ubuntu-latest | ||
needs: [clippy, cargo-fmt, cargo-doc, test] | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.MY_GITHUB_TOKEN }} | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: MarcoIeni/[email protected] | ||
env: | ||
# https://release-plz.ieni.dev/docs/github/trigger | ||
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
members = [ | ||
"workspaces", | ||
"examples", | ||
] | ||
] |
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
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
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
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
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
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
Oops, something went wrong.