-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dev: Bump version, update docs and changelog. Create separate wasm test file. Install wasm-pack for github actions. Setup github ci Fix clippy warnings. Add PR template. Tests for SharedPharos. Add SharedPharos. TODO: tests. Make Observe async and rename pharos::Error to PharErr. more chores chore: clean up CI, docs, contribution guidelines. downloads badge cleanup Clarify closure filter in readme. No longer depend on futures-channel separately.
- Loading branch information
Showing
32 changed files
with
1,249 additions
and
722 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,6 @@ | ||
<!--- When contributing all contributions should branch off the --> | ||
<!--- dev branch as master is only used for releases. --> | ||
|
||
<!--- Check CONTRIBUTING.md for more information--> | ||
|
||
<!--- Please describe the changes in the PR and the motivation below --> |
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,99 +1,77 @@ | ||
name: Rust | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
|
||
name: ci | ||
on : [push, pull_request] | ||
|
||
jobs: | ||
|
||
linux-ci: | ||
linux-stable: | ||
|
||
name: Linux Rust Stable | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v1 | ||
- name: Install latest stable Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
|
||
- name: Install rust nightly | ||
- name: Install nightly | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
|
||
run : | | ||
rustup toolchain add nightly | ||
rustup default nightly | ||
|
||
- name: Build | ||
run : cargo build --all-features | ||
- name: Checkout crate | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run tests | ||
run : cargo test --all-features | ||
run: bash ci/test.bash | ||
|
||
- name: Build --release | ||
run: cargo build --all-features --release | ||
|
||
- name: Run tests --release | ||
run: cargo test --all-features --release | ||
linux-nightly: | ||
|
||
- name: Build docs | ||
run : cargo doc --no-deps --all-features | ||
name: Linux Rust Nightly | ||
runs-on: ubuntu-latest | ||
|
||
# doesn't work on nightly until rustup can install the latest nightly which has clippy. | ||
# | ||
# - name: Run clippy | ||
# run : cargo +stable clippy --all-features | ||
steps: | ||
|
||
- name: Install latest nightly Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
components: clippy | ||
|
||
windows-ci: | ||
|
||
runs-on: windows-latest | ||
- name: Checkout crate | ||
uses: actions/checkout@v2 | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v1 | ||
- name: Run clippy | ||
run : bash ci/clippy.bash | ||
|
||
- name: Install rust nightly | ||
|
||
run : | | ||
rustup toolchain add nightly | ||
rustup default nightly | ||
- name: Build documentation | ||
run : bash ci/doc.bash | ||
|
||
- name: Build | ||
run : cargo build --all-features | ||
|
||
- name: Run tests | ||
run : cargo test --all-features | ||
|
||
|
||
macos-ci: | ||
run : bash ci/test.bash | ||
|
||
runs-on: macOS-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v1 | ||
- name: Check coverage | ||
run: bash ci/coverage.bash | ||
|
||
- name: Install rust nightly | ||
|
||
run : | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && sh rustup.sh -y | ||
source $HOME/.cargo/env | ||
rustup toolchain add nightly | ||
rustup default nightly | ||
- name: install wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') | ||
version: 'latest' | ||
|
||
- name: Build | ||
run : | | ||
source $HOME/.cargo/env | ||
cargo build --all-features | ||
- name: Run tests on wasm | ||
run: bash ci/wasm.bash | ||
|
||
- name: Run tests | ||
run : | | ||
source $HOME/.cargo/env | ||
cargo test --all-features | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Contributing | ||
|
||
This repository accepts contributions. Ideas, questions, feature requests and bug reports can be filed through Github issues. | ||
|
||
Pull Requests are welcome on Github. By committing pull requests, you accept that your code might be modified and reformatted to fit the project coding style or to improve the implementation. Contributed code is considered licensed under the same license as the rest of the project unless explicitly agreed otherwise. See the `LICENCE` file. | ||
|
||
Please discuss what you want to see modified before filing a pull request if you don't want to be doing work that might be rejected. | ||
|
||
|
||
## Code formatting | ||
|
||
I understand my code formatting style is quite uncommon, but it is deliberate and helps readability for me. Unfortunately, it cannot be achieved with automated tools like `rustfmt`. **Feel free to contribute code formatted however you are comfortable writing it**. I am happy to reformat during the review process. If you are uncomfortable reading my code, I suggest running `rustfmt` on the entire source tree or set your line-height to 1.2 instead of the common 1.5, which will make it look a lot less over the top. | ||
|
||
|
||
# git workflow | ||
|
||
Please file PR's against the `dev` branch, don't forget to update the documentation. |
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,34 +6,47 @@ status = "actively-developed" | |
[badges.travis-ci] | ||
repository = "najamelan/pharos" | ||
|
||
[dependencies] | ||
futures-channel = "^0.3" | ||
[build-dependencies] | ||
rustc_version = "^0.2" | ||
|
||
[dependencies] | ||
[dependencies.futures] | ||
default-features = false | ||
version = "^0.3" | ||
|
||
[dev-dependencies] | ||
assert_matches = "^1" | ||
futures = "^0.3" | ||
wasm-bindgen-test = "^0.3" | ||
|
||
[features] | ||
external_doc = [] | ||
[dev-dependencies.async-std] | ||
features = ["attributes"] | ||
version = "^1" | ||
|
||
[dev-dependencies.async_executors] | ||
features = ["async_std"] | ||
version = "^0.4" | ||
|
||
[package] | ||
authors = ["Naja Melan <[email protected]>"] | ||
categories = ["asynchronous"] | ||
description = "Observer pattern which generates a futures 0.3 stream of events" | ||
documentation = "https://docs.rs/pharos" | ||
edition = "2018" | ||
exclude = ["tests", "examples", "ci", ".travis.yml", "TODO.md", "CONTRIBUTING.md"] | ||
keywords = ["observer", "futures", "stream", "broadcast", "publish_subscribe"] | ||
license = "Unlicense" | ||
name = "pharos" | ||
readme = "README.md" | ||
repository = "https://github.com/najamelan/pharos" | ||
version = "0.4.2" | ||
version = "0.5.0" | ||
|
||
[package.metadata] | ||
[package.metadata.docs] | ||
[package.metadata.docs.rs] | ||
all-features = true | ||
targets = [] | ||
|
||
[profile] | ||
[profile.release] | ||
codegen-units = 1 |
Oops, something went wrong.