Add allow_methods to CorsLayer too. #12
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
name: 'Rust Build' | |
on: | |
push: | |
paths: | |
- '.github/workflows/check.yaml' | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
- 'src/**' | |
- 'build.rs' | |
jobs: | |
build: | |
name: Compile | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cargo Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
./target | |
key: ${{ runner.os }}-rust-${{ hashFiles('Cargo.toml') }} | |
- name: Build | |
run: cargo build | |
clippy_lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
components: rustfmt, clippy | |
- name: Cargo Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
./target | |
key: ${{ runner.os }}-rust-lint-${{ hashFiles('Cargo.toml') }} | |
- name: Rustfmt | |
run: cargo fmt --all -- --check | |
- name: Clippy | |
run: cargo clippy |