mirror of
https://github.com/seemueller-io/hyper-custom-cert.git
synced 2025-09-08 22:46:45 +00:00
Restore github old workflows
This commit is contained in:
53
.github/workflows/ci.yml
vendored
53
.github/workflows/ci.yml
vendored
@@ -6,8 +6,30 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: build-and-test (test-all.sh)
|
name: build-and-test (${{ matrix.name }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: crates/hyper-custom-cert
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: default (native-tls)
|
||||||
|
features: ""
|
||||||
|
no-default-features: false
|
||||||
|
- name: no-default-features (no TLS)
|
||||||
|
features: ""
|
||||||
|
no-default-features: true
|
||||||
|
- name: rustls
|
||||||
|
features: "rustls"
|
||||||
|
no-default-features: true
|
||||||
|
- name: insecure-dangerous (native-tls)
|
||||||
|
features: "insecure-dangerous"
|
||||||
|
no-default-features: false
|
||||||
|
- name: rustls + insecure-dangerous
|
||||||
|
features: "rustls,insecure-dangerous"
|
||||||
|
no-default-features: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -31,12 +53,25 @@ jobs:
|
|||||||
- name: Cargo fmt (check)
|
- name: Cargo fmt (check)
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
- name: Clippy (default)
|
- name: Clippy
|
||||||
run: cargo clippy --all-targets -- -D warnings
|
|
||||||
|
|
||||||
- name: Ensure test-all.sh is executable
|
|
||||||
run: chmod +x ./scripts/test-all.sh
|
|
||||||
|
|
||||||
- name: Run comprehensive test suite
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./scripts/test-all.sh
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||||
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||||
|
echo "Running: cargo clippy --all-targets $FLAGS -- -D warnings"
|
||||||
|
cargo clippy --all-targets $FLAGS -- -D warnings
|
||||||
|
|
||||||
|
- name: Tests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||||
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||||
|
echo "Running: cargo test $FLAGS -- --nocapture"
|
||||||
|
cargo test $FLAGS -- --nocapture
|
||||||
|
|
||||||
|
- name: Build Docs
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cargo doc -p hyper-custom-cert --no-deps
|
||||||
|
102
.github/workflows/release.yml
vendored
102
.github/workflows/release.yml
vendored
@@ -10,8 +10,30 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs:
|
docs:
|
||||||
name: Build and validate documentation (test-all.sh quick)
|
name: Build and validate documentation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: crates/hyper-custom-cert
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: default-features
|
||||||
|
features: ""
|
||||||
|
no-default-features: false
|
||||||
|
- name: no-default-features
|
||||||
|
features: ""
|
||||||
|
no-default-features: true
|
||||||
|
- name: rustls
|
||||||
|
features: "rustls"
|
||||||
|
no-default-features: true
|
||||||
|
- name: insecure-dangerous
|
||||||
|
features: "insecure-dangerous"
|
||||||
|
no-default-features: false
|
||||||
|
- name: all-features
|
||||||
|
features: "rustls,insecure-dangerous"
|
||||||
|
no-default-features: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -29,17 +51,59 @@ jobs:
|
|||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
run: rustup update stable && rustup default stable
|
run: rustup update stable && rustup default stable
|
||||||
|
|
||||||
- name: Ensure test-all.sh is executable
|
- name: Build documentation
|
||||||
run: chmod +x ./scripts/test-all.sh
|
|
||||||
|
|
||||||
- name: Run test-all.sh (quick mode)
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./scripts/test-all.sh --quick
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||||
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||||
|
echo "Running: cargo doc $FLAGS --no-deps"
|
||||||
|
cargo doc $FLAGS --no-deps
|
||||||
|
|
||||||
|
- name: Check documentation warnings
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||||
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||||
|
echo "Running: cargo doc $FLAGS --no-deps"
|
||||||
|
RUSTDOCFLAGS="-D warnings" cargo doc $FLAGS --no-deps
|
||||||
|
|
||||||
|
- name: Test documentation examples
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||||
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||||
|
echo "Running: cargo test --doc $FLAGS"
|
||||||
|
cargo test --doc $FLAGS
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test before release (test-all.sh)
|
name: Test before release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: docs
|
needs: docs
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: crates/hyper-custom-cert
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: default (native-tls)
|
||||||
|
features: ""
|
||||||
|
no-default-features: false
|
||||||
|
- name: no-default-features (no TLS)
|
||||||
|
features: ""
|
||||||
|
no-default-features: true
|
||||||
|
- name: rustls
|
||||||
|
features: "rustls"
|
||||||
|
no-default-features: true
|
||||||
|
- name: insecure-dangerous (native-tls)
|
||||||
|
features: "insecure-dangerous"
|
||||||
|
no-default-features: false
|
||||||
|
- name: rustls + insecure-dangerous
|
||||||
|
features: "rustls,insecure-dangerous"
|
||||||
|
no-default-features: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -63,15 +127,23 @@ jobs:
|
|||||||
- name: Cargo fmt (check)
|
- name: Cargo fmt (check)
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
- name: Clippy (default)
|
- name: Clippy
|
||||||
run: cargo clippy --all-targets -- -D warnings
|
|
||||||
|
|
||||||
- name: Ensure test-all.sh is executable
|
|
||||||
run: chmod +x ./scripts/test-all.sh
|
|
||||||
|
|
||||||
- name: Run comprehensive test suite
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./scripts/test-all.sh
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||||
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||||
|
echo "Running: cargo clippy --all-targets $FLAGS -- -D warnings"
|
||||||
|
cargo clippy --all-targets $FLAGS -- -D warnings
|
||||||
|
|
||||||
|
- name: Tests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
FLAGS=""
|
||||||
|
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||||
|
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||||
|
echo "Running: cargo test $FLAGS -- --nocapture"
|
||||||
|
cargo test $FLAGS -- --nocapture
|
||||||
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
Reference in New Issue
Block a user