forked from haydnv/destream_json
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add workflows #1
Open
DrewMcArthur
wants to merge
16
commits into
main
Choose a base branch
from
impl/create-actions
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ec2449c
add workflows
DrewMcArthur 98b3f9b
fix warnings
DrewMcArthur 60b48bf
don't specify manifest path
DrewMcArthur 92557a5
update versions for cargo check
DrewMcArthur 9f2d053
fix clippy warnings
DrewMcArthur 2925af8
comment out fuzz testing
DrewMcArthur 950a5d0
remove miri
DrewMcArthur 4c6e915
run clippy and outdated on pull requests
DrewMcArthur e332e28
remove reference to non existant cargo file
DrewMcArthur 4270bba
bump base64 version
DrewMcArthur 6b306cb
easier clippy
DrewMcArthur 4cff4fd
fix test clippy
DrewMcArthur f3b4097
fix test
DrewMcArthur a2f1812
add decode_bool coverage to unit test
DrewMcArthur 1aa1caf
undo unrelated change
DrewMcArthur 198b0e5
don't specify patch versions
DrewMcArthur File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,31 @@ | ||
# from https://pratikpc.medium.com/publishing-crates-using-github-actions-165ee67780e1 | ||
|
||
on: | ||
push: | ||
# Pattern matched against refs/tags | ||
tags: | ||
- "*" # Push events to every tag not containing / | ||
|
||
name: Publish | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if token in environment | ||
run: ${{ secrets.CRATES_TOKEN }} == '' && echo "No token in environment, exiting" && exit 1 | ||
|
||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- run: cargo publish --token ${CRATES_TOKEN} | ||
env: | ||
CRATES_TOKEN: ${{ secrets.CRATES_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 |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
RUSTFLAGS: -Dwarnings | ||
|
||
jobs: | ||
test: | ||
name: Rust Nightly Tests ${{matrix.os == 'windows' && '(windows)' || ''}} | ||
runs-on: ${{matrix.os}}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu, windows] | ||
timeout-minutes: 45 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- run: cargo test | ||
- run: cargo test --features tokio-io --tests -- --skip ui --exact | ||
- run: cargo test --features value --tests -- --skip ui --exact | ||
- run: cargo test --features all --tests -- --skip ui --exact | ||
|
||
build: | ||
name: Rust ${{matrix.rust}} ${{matrix.os == 'windows' && '(windows)' || ''}} | ||
runs-on: ${{matrix.os}}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: [beta, 1.76.0, 1.65.0] | ||
os: [ubuntu] | ||
include: | ||
- rust: stable | ||
os: ubuntu | ||
target: aarch64-unknown-none | ||
- rust: stable | ||
os: windows | ||
timeout-minutes: 45 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{matrix.rust}} | ||
targets: ${{matrix.target}} | ||
- run: cargo check | ||
- run: cargo check --features tokio-io | ||
- run: cargo check --features value | ||
- run: cargo check --features all | ||
|
||
# this fails right now because of errors in get-size-derive. | ||
# number-general should require 0.1.3 | ||
# minimal: | ||
# name: Minimal versions | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 45 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: dtolnay/rust-toolchain@nightly | ||
# - run: cargo generate-lockfile -Z minimal-versions | ||
# - run: cargo check --locked | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 45 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@clippy | ||
- run: cargo clippy --tests # -- -Dclippy::all -Dclippy::pedantic | ||
- run: cargo clippy --all-features --tests # -- -Dclippy::all -Dclippy::pedantic | ||
|
||
doc: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 45 | ||
env: | ||
RUSTDOCFLAGS: -Dwarnings | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- uses: dtolnay/install@cargo-docs-rs | ||
- run: cargo docs-rs | ||
|
||
# fuzz testing async code seems hard | ||
# fuzz: | ||
# name: Fuzz | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 45 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: dtolnay/rust-toolchain@nightly | ||
# - uses: dtolnay/install@cargo-fuzz | ||
# - run: cargo fuzz check | ||
|
||
outdated: | ||
name: Outdated | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 45 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/install@cargo-outdated | ||
- run: cargo outdated --exit-code 1 |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
pub const COLON: &'static [u8] = b":"; | ||
pub const COMMA: &'static [u8] = b","; | ||
pub const DECIMAL: &'static [u8] = b"."; | ||
pub const E: &'static [u8] = b"e"; | ||
pub const ESCAPE: &'static [u8] = b"\\"; | ||
pub const COLON: &[u8] = b":"; | ||
pub const COMMA: &[u8] = b","; | ||
pub const DECIMAL: &[u8] = b"."; | ||
pub const E: &[u8] = b"e"; | ||
pub const ESCAPE: &[u8] = b"\\"; | ||
pub const FALSE: &[u8] = b"false"; | ||
pub const TRUE: &[u8] = b"true"; | ||
pub const LIST_BEGIN: &'static [u8] = b"["; | ||
pub const LIST_END: &'static [u8] = b"]"; | ||
pub const LIST_BEGIN: &[u8] = b"["; | ||
pub const LIST_END: &[u8] = b"]"; | ||
pub const NULL: &[u8] = b"null"; | ||
pub const MAP_BEGIN: &'static [u8] = b"{"; | ||
pub const MAP_END: &'static [u8] = b"}"; | ||
pub const MAP_BEGIN: &[u8] = b"{"; | ||
pub const MAP_END: &[u8] = b"}"; | ||
pub const NUMERIC: [u8; 15] = [ | ||
b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'0', b'-', b'e', b'E', b'.', | ||
]; | ||
pub const QUOTE: &'static [u8] = b"\""; | ||
pub const QUOTE: &[u8] = b"\""; |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should maybe make sure a test covers this, but clippy complained that these two condition blocks were the same, so i combined the conditions