mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 18:37:41 +02:00
rename private-network-access feature (#320)
* update CI with concurrency options * cors: rename private-network => local-network * modernize CI * clippy * run api diff job on all features
This commit is contained in:
58
.github/workflows/ci-post-merge.yml
vendored
58
.github/workflows/ci-post-merge.yml
vendored
@ -1,8 +1,14 @@
|
||||
name: CI (post-merge)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
push: { branches: [master] }
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_and_test_linux_nightly:
|
||||
@ -27,39 +33,26 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install ${{ matrix.version }}
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||
profile: minimal
|
||||
override: true
|
||||
toolchain: ${{ matrix.version }}
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: taiki-e/install-action@cargo-hack
|
||||
|
||||
- name: Generate Cargo.lock
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: generate-lockfile
|
||||
- name: Cache Dependencies
|
||||
uses: Swatinem/rust-cache@v2.1.0
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
|
||||
- name: check minimal
|
||||
uses: actions-rs/cargo@v1
|
||||
with: { command: ci-min }
|
||||
run: cargo ci-min
|
||||
|
||||
- name: check minimal + examples
|
||||
uses: actions-rs/cargo@v1
|
||||
with: { command: ci-check-min-examples }
|
||||
run: cargo ci-check-min-examples
|
||||
|
||||
- name: check default
|
||||
uses: actions-rs/cargo@v1
|
||||
with: { command: ci-check }
|
||||
run: cargo ci-check
|
||||
|
||||
- name: tests
|
||||
uses: actions-rs/cargo@v1
|
||||
timeout-minutes: 40
|
||||
with: { command: ci-test }
|
||||
run: cargo ci-test
|
||||
|
||||
- name: Clear the cargo caches
|
||||
run: |
|
||||
@ -86,18 +79,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install ${{ matrix.version }}
|
||||
run: |
|
||||
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: taiki-e/install-action@cargo-hack
|
||||
|
||||
- name: Generate Cargo.lock
|
||||
run: cargo generate-lockfile
|
||||
- name: Cache Dependencies
|
||||
uses: Swatinem/rust-cache@v2.1.0
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
|
||||
- name: check minimal
|
||||
run: cargo ci-min
|
||||
|
84
.github/workflows/ci.yml
vendored
84
.github/workflows/ci.yml
vendored
@ -1,10 +1,15 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request: {}
|
||||
push: { branches: [master] }
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_and_test_linux:
|
||||
@ -35,33 +40,18 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install ${{ matrix.version }}
|
||||
run: |
|
||||
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: taiki-e/install-action@cargo-hack
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
|
||||
- name: workaround MSRV issues
|
||||
if: matrix.version != 'stable'
|
||||
run: |
|
||||
cargo install cargo-edit --version=0.8.0
|
||||
cargo add env_logger@0.9 --dev -p=actix-cors
|
||||
cargo add env_logger@0.9 --dev -p=actix-identity
|
||||
cargo add env_logger@0.9 --dev -p=actix-redis
|
||||
cargo add env_logger@0.9 --dev -p=actix-session
|
||||
cargo add env_logger@0.9 --dev -p=actix-settings
|
||||
|
||||
- name: Generate Cargo.lock
|
||||
run: cargo generate-lockfile
|
||||
- name: Cache Dependencies
|
||||
uses: Swatinem/rust-cache@v2.1.0
|
||||
|
||||
- name: workaround MSRV issues
|
||||
if: matrix.version != 'stable'
|
||||
run: |
|
||||
cargo update -p=time --precise=0.3.13
|
||||
cargo update -p=time:0.3.20 --precise=0.3.16
|
||||
|
||||
- name: check minimal
|
||||
run: cargo ci-min
|
||||
@ -102,33 +92,21 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install ${{ matrix.version }}
|
||||
run: |
|
||||
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: taiki-e/install-action@cargo-hack
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
|
||||
- name: workaround MSRV issues
|
||||
if: matrix.version != 'stable'
|
||||
run: |
|
||||
cargo install cargo-edit --version=0.8.0
|
||||
cargo add env_logger@0.9 --dev -p=actix-cors
|
||||
cargo add env_logger@0.9 --dev -p=actix-identity
|
||||
cargo add env_logger@0.9 --dev -p=actix-redis
|
||||
cargo add env_logger@0.9 --dev -p=actix-session
|
||||
cargo add env_logger@0.9 --dev -p=actix-settings
|
||||
|
||||
- name: Generate Cargo.lock
|
||||
run: cargo generate-lockfile
|
||||
- name: Cache Dependencies
|
||||
uses: Swatinem/rust-cache@v2.1.0
|
||||
|
||||
- name: workaround MSRV issues
|
||||
if: matrix.version != 'stable'
|
||||
run: |
|
||||
cargo update -p=time --precise=0.3.13
|
||||
cargo update -p=time:0.3.20 --precise=0.3.16
|
||||
|
||||
- name: check minimal
|
||||
run: cargo ci-min
|
||||
@ -155,14 +133,8 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust (nightly)
|
||||
run: |
|
||||
rustup install nightly
|
||||
rustup override set nightly
|
||||
|
||||
- name: Generate Cargo.lock
|
||||
run: cargo generate-lockfile
|
||||
- name: Cache Dependencies
|
||||
uses: Swatinem/rust-cache@v2.1.0
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with: { toolchain: nightly }
|
||||
|
||||
- name: doc tests
|
||||
timeout-minutes: 40
|
||||
|
10
.github/workflows/coverage.yml
vendored
10
.github/workflows/coverage.yml
vendored
@ -3,8 +3,14 @@
|
||||
name: Coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
push: { branches: [master] }
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
|
52
.github/workflows/lint.yml
vendored
52
.github/workflows/lint.yml
vendored
@ -1,8 +1,13 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
@ -10,11 +15,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
rustup override set nightly
|
||||
rustup update nightly
|
||||
rustup component add rustfmt
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
components: rustfmt
|
||||
|
||||
- name: Check with rustfmt
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
@ -24,9 +30,31 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
rustup override set stable
|
||||
rustup update stable
|
||||
rustup component add rustfmt
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with: { components: clippy }
|
||||
|
||||
- name: Check with Clippy
|
||||
run: cargo clippy --workspace --tests --all-features
|
||||
|
||||
public-api-diff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout ${{ github.base_ref }}
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.base_ref }}
|
||||
|
||||
- name: checkout ${{ github.head_ref }}
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with: { toolchain: nightly }
|
||||
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-public-api }
|
||||
|
||||
- name: generate API diff
|
||||
run: |
|
||||
for f in $(find -mindepth 2 -maxdepth 2 -name Cargo.toml); do
|
||||
cargo public-api --manifest-path "$f" --all-features diff ${{ github.event.pull_request.base.sha }}..${{ github.sha }}
|
||||
done
|
||||
|
10
.github/workflows/upload-doc.yml
vendored
10
.github/workflows/upload-doc.yml
vendored
@ -1,8 +1,14 @@
|
||||
name: Upload Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
push: { branches: [master] }
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
Reference in New Issue
Block a user