Windows updates #202
Workflow file for this run
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: Code Coverage | |
on: | |
pull_request: | |
branches: | |
- "main" | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
coverage: | |
strategy: | |
fail-fast: false | |
matrix: | |
info: | |
- { os: "macOS-latest", target: "x86_64-apple-darwin", cross: false } | |
- { | |
os: "ubuntu-latest", | |
target: "x86_64-unknown-linux-gnu", | |
cross: false, | |
} | |
- { | |
os: "windows-latest", | |
target: "x86_64-pc-windows-msvc", | |
cross: false, | |
} | |
runs-on: ${{ matrix.info.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
targets: ${{ matrix.info.target }} | |
- name: Setup NodeJS toolchain | |
uses: actions/setup-node@v3 | |
- name: Install TailwindCSS | |
run: npm install -D tailwindcss | |
- name: Install DaisyUI | |
run: npm install -D daisyui@latest | |
- name: Install TailwindCSS Typography | |
run: npm install -D @tailwindcss/typography | |
- name: Add WASM Support | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install trunk | |
uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install just runner | |
uses: taiki-e/install-action@just | |
- name: Enable Rust cache | |
uses: Swatinem/[email protected] | |
with: | |
save-if: false | |
- name: Generate code coverage (macOS) | |
if: matrix.info.os == 'macOS-latest' | |
run: sudo just _coverage | |
- name: Setup Rust for root (Linux) | |
if: matrix.info.os == 'ubuntu-latest' | |
run: sudo env "PATH=$PATH" rustup default stable && sudo env "PATH=$PATH" rustup target add wasm32-unknown-unknown | |
- name: Generate code coverage (Linux) | |
if: matrix.info.os == 'ubuntu-latest' | |
run: sudo env "PATH=$PATH" just _coverage | |
- name: Generate code coverage (Windows) | |
if: matrix.info.os == 'windows-latest' | |
run: just --shell pwsh.exe --shell-arg -c _coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: true |