1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-12-18 01:33:59 +01:00

Fix GHA deprecation warnings (#301)

This commit is contained in:
Yuki Okushi 2022-12-01 19:45:31 +09:00 committed by GitHub
parent 9508be94d5
commit 1774b8a36e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 112 deletions

View File

@ -42,7 +42,7 @@ jobs:
with: with:
command: generate-lockfile command: generate-lockfile
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1.2.0 uses: Swatinem/rust-cache@v2.1.0
- name: check minimal - name: check minimal
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
@ -72,7 +72,11 @@ jobs:
matrix: matrix:
target: target:
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin } - { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc } - {
name: Windows,
os: windows-latest,
triple: x86_64-pc-windows-msvc,
}
version: version:
- nightly - nightly
@ -83,44 +87,30 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install ${{ matrix.version }} - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1 run: |
with: rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }} rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
profile: minimal
override: true
- name: Install cargo-hack - name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack uses: taiki-e/install-action@cargo-hack
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with:
command: generate-lockfile
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1.2.0 uses: Swatinem/rust-cache@v2.1.0
- name: check minimal - name: check minimal
uses: actions-rs/cargo@v1 run: cargo ci-min
with: { command: ci-min }
- name: check minimal + examples - name: check minimal + examples
uses: actions-rs/cargo@v1 run: cargo ci-check-min-examples
with: { command: ci-check-min-examples }
- name: check default - name: check default
uses: actions-rs/cargo@v1 run: cargo ci-check
with: { command: ci-check }
- name: tests - name: tests
uses: actions-rs/cargo@v1
timeout-minutes: 40 timeout-minutes: 40
with: run: cargo ci-test --exclude=actix-redis --exclude=actix-session --exclude=actix-limitation -- --nocapture
command: ci-test
args: >-
--exclude=actix-redis
--exclude=actix-session
--exclude=actix-limitation
-- --nocapture
- name: Clear the cargo caches - name: Clear the cargo caches
run: | run: |

View File

@ -36,38 +36,30 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install ${{ matrix.version }} - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1 run: |
with: rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }} rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
profile: minimal
override: true
- name: Install cargo-hack - name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack uses: taiki-e/install-action@cargo-hack
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with:
command: generate-lockfile
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1.2.0 uses: Swatinem/rust-cache@v2.1.0
- name: check minimal - name: check minimal
uses: actions-rs/cargo@v1 run: cargo ci-min
with: { command: ci-min }
- name: check minimal + examples - name: check minimal + examples
uses: actions-rs/cargo@v1 run: cargo ci-check-min-examples
with: { command: ci-check-min-examples }
- name: check default - name: check default
uses: actions-rs/cargo@v1 run: cargo ci-check
with: { command: ci-check }
- name: tests - name: tests
uses: actions-rs/cargo@v1
timeout-minutes: 40 timeout-minutes: 40
with: { command: ci-test } run: cargo ci-test
- name: Clear the cargo caches - name: Clear the cargo caches
run: | run: |
@ -80,7 +72,11 @@ jobs:
matrix: matrix:
target: target:
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin } - { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc } - {
name: Windows,
os: windows-latest,
triple: x86_64-pc-windows-msvc,
}
version: version:
- 1.59 # MSRV - 1.59 # MSRV
- stable - stable
@ -92,43 +88,30 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install ${{ matrix.version }} - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1 run: |
with: rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }} rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
profile: minimal
override: true
- name: Install cargo-hack - name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack uses: taiki-e/install-action@cargo-hack
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with:
command: generate-lockfile
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1.2.0 uses: Swatinem/rust-cache@v2.1.0
- name: check minimal - name: check minimal
uses: actions-rs/cargo@v1 run: cargo ci-min
with: { command: ci-min }
- name: check minimal + examples - name: check minimal + examples
uses: actions-rs/cargo@v1 run: cargo ci-check-min-examples
with: { command: ci-check-min-examples }
- name: check default - name: check default
uses: actions-rs/cargo@v1 run: cargo ci-check
with: { command: ci-check }
- name: tests - name: tests
uses: actions-rs/cargo@v1
timeout-minutes: 40 timeout-minutes: 40
with: run: cargo ci-test --exclude=actix-redis --exclude=actix-session --exclude=actix-limitation
command: ci-test
args: >-
--exclude=actix-redis
--exclude=actix-session
--exclude=actix-limitation
- name: Clear the cargo caches - name: Clear the cargo caches
run: | run: |
@ -142,21 +125,15 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Rust (nightly) - name: Install Rust (nightly)
uses: actions-rs/toolchain@v1 run: |
with: rustup install nightly
toolchain: nightly-x86_64-unknown-linux-gnu rustup override set nightly
profile: minimal
override: true
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with: { command: generate-lockfile }
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0 uses: Swatinem/rust-cache@v2.1.0
- name: doc tests - name: doc tests
uses: actions-rs/cargo@v1
timeout-minutes: 40 timeout-minutes: 40
with: run: cargo ci-doctest -- --nocapture
command: ci-doctest
args: -- --nocapture

View File

@ -21,22 +21,19 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install stable - name: Install stable
uses: actions-rs/toolchain@v1 run: |
with: rustup override set stable
toolchain: stable-x86_64-unknown-linux-gnu rustup update stable
profile: minimal
override: true
- name: Generate Cargo.lock - name: Generate Cargo.lock
uses: actions-rs/cargo@v1 run: cargo generate-lockfile
with: { command: generate-lockfile }
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v1.2.0 uses: Swatinem/rust-cache@v2.1.0
- name: Generate coverage file - name: Generate coverage file
run: | run: |
cargo install cargo-tarpaulin --vers "^0.13" cargo install cargo-tarpaulin --vers "^0.13"
cargo tarpaulin --workspace --out Xml --verbose cargo tarpaulin --workspace --out Xml --verbose
- name: Upload to Codecov - name: Upload to Codecov
uses: codecov/codecov-action@v1 uses: codecov/codecov-action@v3
with: { file: cobertura.xml } with: { file: cobertura.xml }

View File

@ -11,15 +11,12 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 run: |
with: rustup override set nightly
toolchain: nightly rustup update nightly
components: rustfmt rustup component add rustfmt
- name: Check with rustfmt - name: Check with rustfmt
uses: actions-rs/cargo@v1 run: cargo fmt --all -- --check
with:
command: fmt
args: --all -- --check
clippy: clippy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -27,13 +24,9 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 run: |
with: rustup override set stable
toolchain: stable rustup update stable
components: clippy rustup component add rustfmt
override: true
- name: Check with Clippy - name: Check with Clippy
uses: actions-rs/clippy-check@v1 run: cargo clippy --workspace --tests --all-features
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --tests --all-features

View File

@ -12,17 +12,12 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 run: |
with: rustup override set nightly
toolchain: nightly-x86_64-unknown-linux-gnu rustup update nightly
profile: minimal
override: true
- name: Build Docs - name: Build Docs
uses: actions-rs/cargo@v1 run: cargo doc --workspace --all-features --no-deps
with:
command: doc
args: --workspace --all-features --no-deps
- name: Tweak HTML - name: Tweak HTML
run: echo '<meta http-equiv="refresh" content="0;url=actix_cors/index.html">' > target/doc/index.html run: echo '<meta http-equiv="refresh" content="0;url=actix_cors/index.html">' > target/doc/index.html