-
Notifications
You must be signed in to change notification settings - Fork 3
build: import config from imap-codec #22
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
Open
soywod
wants to merge
2
commits into
duesee:main
Choose a base branch
from
soywod:config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| github: [duesee] |
This file contains hidden or 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,21 @@ | ||
| name: cache_restore | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - uses: actions/cache/restore@v4 | ||
| with: | ||
| path: | | ||
| # See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci | ||
| ~/.cargo/.crates.toml | ||
| ~/.cargo/.crates2.json | ||
| ~/.cargo/bin/ | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| # See https://doc.rust-lang.org/cargo/guide/build-cache.html | ||
| target | ||
| key: ${{ runner.os }}|${{ github.job }}|${{ github.run_attempt }} | ||
| restore-keys: | | ||
| ${{ runner.os }}|${{ github.job }} | ||
| ${{ runner.os }} | ||
|
|
This file contains hidden or 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,18 @@ | ||
| name: cache_save | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - uses: actions/cache/save@v4 | ||
| with: | ||
| path: | | ||
| # See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci | ||
| ~/.cargo/.crates.toml | ||
| ~/.cargo/.crates2.json | ||
| ~/.cargo/bin/ | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| # See https://doc.rust-lang.org/cargo/guide/build-cache.html | ||
| target | ||
| key: ${{ runner.os }}|${{ github.job }}|${{ github.run_attempt }} | ||
|
|
This file contains hidden or 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,14 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| - package-ecosystem: "cargo" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| dependencies: | ||
| patterns: | ||
| - "*" |
This file contains hidden or 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,26 @@ | ||
| name: audit | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| schedule: | ||
| # 21:43 on Wednesday and Sunday. (Thanks, crontab.guru) | ||
| - cron: '43 21 * * 3,0' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| audit: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: ./.github/actions/cache_restore | ||
| - run: cargo install just | ||
| - run: just audit | ||
| - uses: ./.github/actions/cache_save |
This file contains hidden or 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,95 @@ | ||
| name: main | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: ./.github/actions/cache_restore | ||
| - run: cargo install just | ||
| - run: just check | ||
| - uses: ./.github/actions/cache_save | ||
|
|
||
| test: | ||
| strategy: | ||
| matrix: | ||
| os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: ./.github/actions/cache_restore | ||
| - run: cargo install just | ||
| - run: just test | ||
| - uses: ./.github/actions/cache_save | ||
|
|
||
| # benchmark: | ||
| # runs-on: ubuntu-latest | ||
|
|
||
| # steps: | ||
| # - uses: actions/checkout@v6 | ||
|
|
||
| # - uses: ./.github/actions/cache_restore | ||
| # - run: cargo install just | ||
| # - run: just bench_against_main | ||
| # - uses: ./.github/actions/cache_save | ||
|
|
||
| coverage: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: ./.github/actions/cache_restore | ||
| - run: cargo install just | ||
| - run: just coverage | ||
| - uses: ./.github/actions/cache_save | ||
|
|
||
| - uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e | ||
| with: | ||
| format: lcov | ||
| file: target/coverage/coverage.lcov | ||
|
|
||
| fuzz: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: ./.github/actions/cache_restore | ||
| - run: cargo install just | ||
| - run: just fuzz | ||
| - uses: ./.github/actions/cache_save | ||
|
|
||
| check_msrv: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: ./.github/actions/cache_restore | ||
| - run: cargo install just | ||
| - run: just check_msrv | ||
| - uses: ./.github/actions/cache_save | ||
|
|
||
| check_minimal_dependency_versions: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: ./.github/actions/cache_restore | ||
| - run: cargo install just | ||
| - run: just check_minimal_dependency_versions | ||
| - uses: ./.github/actions/cache_save | ||
|
|
This file contains hidden or 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,42 @@ | ||
| name: release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'smtp-codec/v*' | ||
| - 'smtp-types/v*' | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Extract crate name from Git tag | ||
| run: | | ||
| set -euo pipefail | ||
| tag_name=${GITHUB_REF#refs/tags/} | ||
| crate_name=${tag_name%/v*} | ||
| echo "Extracted crate name: $crate_name" | ||
| echo "CRATE_NAME=$crate_name" >> "$GITHUB_ENV" | ||
|
|
||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Assert release version matches crate version | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| # Get release version from Git tag | ||
| tag_version=${GITHUB_REF#refs/tags/$CRATE_NAME/v} | ||
|
|
||
| # Get crate version from Cargo.toml | ||
| cd $CRATE_NAME | ||
| crate_version=$(cargo read-manifest | jq -r .version) | ||
|
|
||
| if [ "$tag_version" != "$crate_version" ]; then | ||
| echo "Error: Release version in Git tag (${tag_version}) does not match crate version in Cargo.toml (${crate_version}) for crate $CRATE_NAME." | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Publish crate to crates.io | ||
| env: | ||
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
| run: cargo publish -p $CRATE_NAME |
This file contains hidden or 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,3 +1,8 @@ | ||
| Cargo.lock | ||
| /target | ||
| target | ||
| .idea | ||
|
|
||
| # direnv (https://direnv.net/) | ||
| .envrc | ||
| .direnv | ||
|
|
||
| nohup.out | ||
This file contains hidden or 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,30 @@ | ||
| # Welcome to smtp-codec's (and smtp-types') contributing guide | ||
|
|
||
| Thanks for investing your time to help with this project! Keep in mind that this project is driven by volunteers. Be patient and polite, and empower others to improve. Always use your best judgment and be excellent to each other. | ||
|
|
||
| ## Principles | ||
|
|
||
| ### Misuse resistance | ||
|
|
||
| We use strong-typing to eliminate invalid state. | ||
| Ask yourself: Can I instantiate a type with an invalid variable setting? | ||
| If yes, consider how to eliminate it. | ||
| If you're unsure, let's figure it out together! | ||
|
|
||
| ## Project management | ||
|
|
||
| We use the [just](https://github.com/casey/just) command runner for Continuous Integration (CI). | ||
| The GitHub Actions infrastructure merely calls `just` to execute jobs. | ||
| This means that you can run all required tests for a PR using `just ci`. | ||
|
|
||
| ### Code formatting | ||
|
|
||
| Please ensure that all code is formatted using `cargo +nightly fmt`. | ||
|
|
||
| ### Testing | ||
|
|
||
| Run tests with `cargo test --all-features`. | ||
|
|
||
| ## License | ||
|
|
||
| By contributing to this project, you agree to license your contributions under the same license as the project (MIT OR Apache-2.0). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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,10 +1,9 @@ | ||
| [workspace] | ||
| resolver = "2" | ||
| members = [ | ||
| "smtp-types", | ||
| "smtp-codec", | ||
| "smtp-types", | ||
| ] | ||
|
|
||
| [patch.crates-io] | ||
| smtp-types = { path = "smtp-types" } | ||
| smtp-codec = { path = "smtp-codec" } | ||
| [workspace.package] | ||
| rust-version = "1.85" |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.