mirror of
https://github.com/openharmony/third_party_rust_rust-url.git
synced 2026-07-01 21:04:00 -04:00
604e2fc85e
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
104 lines
2.7 KiB
YAML
104 lines
2.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
|
|
jobs:
|
|
Test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
rust: [1.51.0, stable, beta, nightly]
|
|
exclude:
|
|
- os: macos-latest
|
|
rust: 1.51.0
|
|
- os: windows-latest
|
|
rust: 1.51.0
|
|
- os: macos-latest
|
|
rust: beta
|
|
- os: windows-latest
|
|
rust: beta
|
|
- os: macos-latest
|
|
rust: nightly
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --all-targets
|
|
# Run tests
|
|
- name: Run tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
# Run tests enabling the serde feature
|
|
- name: Run tests with the serde feature
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --features "url/serde,url/expose_internals"
|
|
# The #[debugger_visualizer] attribute is currently gated behind an unstable feature flag.
|
|
# In order to test the visualizers for the url crate, they have to be tested on a nightly build.
|
|
- name: Run debugger_visualizer tests
|
|
if: |
|
|
matrix.os == 'windows-latest' &&
|
|
matrix.rust == 'nightly'
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --test debugger_visualizer --features "url/serde,url/debugger_visualizer" -- --test-threads=1
|
|
|
|
WASM:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
target: wasm32-unknown-unknown
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --target wasm32-unknown-unknown
|
|
|
|
Lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt, clippy
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
- uses: actions-rs/cargo@v1
|
|
if: always()
|
|
with:
|
|
command: clippy
|
|
args: --workspace --all-targets -- -D warnings
|
|
|
|
Audit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|