dioxus/.github/workflows/main.yml

97 lines
2.6 KiB
YAML
Raw Normal View History

2021-12-28 23:17:36 -05:00
on: [push, pull_request]
name: Rust CI
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
2022-01-07 22:21:49 -05:00
- run: sudo apt-get update
2022-01-08 19:05:11 +01:00
- run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev
2021-12-28 23:17:36 -05:00
- uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
2022-01-07 22:21:49 -05:00
- run: sudo apt-get update
2022-02-03 00:16:56 +01:00
- run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev
- uses: davidB/rust-cargo-make@v1
2022-02-03 00:16:56 +01:00
- uses: browser-actions/setup-firefox@latest
- uses: jetli/wasm-pack-action@v0.3.0
2022-02-04 08:47:09 +01:00
- uses: actions-rs/cargo@v1
2021-12-28 23:17:36 -05:00
with:
2022-02-01 21:34:57 +01:00
command: make
args: tests
2021-12-28 23:17:36 -05:00
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
2022-01-08 15:32:53 +01:00
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- run: sudo apt-get update
2022-01-08 19:05:11 +01:00
- run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev
2022-01-08 15:32:53 +01:00
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
2022-02-06 18:14:19 +01:00
coverage:
2022-02-06 19:41:44 +01:00
name: Coverage
2022-02-06 18:14:19 +01:00
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v2
2022-02-06 19:55:15 +01:00
- uses: jetli/wasm-pack-action@v0.3.0
2022-02-06 18:14:19 +01:00
- name: Generate code coverage
run: |
apt-get update &&\
2022-02-06 18:15:54 +01:00
apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev -y &&\
2022-02-06 23:08:26 +01:00
cargo +nightly tarpaulin --verbose --tests --all-features --workspace --timeout 120 --out Xml
2022-02-06 18:14:19 +01:00
- name: Upload to codecov.io
uses: codecov/codecov-action@v2