forked from shssoichiro/zxcvbn-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
99 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: yxcvbn | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
clippy-rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: clippy, rustfmt | ||
|
||
- name: Run rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: -- --check --verbose | ||
|
||
- name: Lint | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --tests --benches | ||
name: lint | ||
|
||
build: | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Build (default features) | ||
run: cargo build --tests --benches | ||
|
||
- name: Run tests (default features) | ||
run: cargo test | ||
|
||
- name: Build (default features) | ||
run: cargo build --tests --benches | ||
|
||
- name: Run tests (all features) | ||
run: cargo test --all-features | ||
|
||
- name: Generate docs | ||
run: cargo doc --all-features --no-deps | ||
|
||
build-wasm: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Install wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
version: "latest" | ||
|
||
- name: Build (wasm, default features) | ||
run: cargo build --target wasm32-unknown-unknown --tests --benches | ||
|
||
- name: Run tests (wasm, default features) | ||
run: wasm-pack test --node | ||
|
||
- name: Build (wasm, default features) | ||
run: cargo build --target wasm32-unknown-unknown --tests --benches | ||
|
||
- name: Run tests (wasm, all features) | ||
run: wasm-pack test --node --all-features |