Skip to content

fix: 🐛 typing of stats #2367

fix: 🐛 typing of stats

fix: 🐛 typing of stats #2367

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [master]
paths-ignore:
- '**/*.md'
pull_request:
types: [opened, synchronize]
paths-ignore:
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
jobs:
cargo-test:
name: Cargo Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get cache expires mark
id: week_mark
run: echo "EXPIRES_WEEK_MARK=$(date +%U)" >> "$GITHUB_OUTPUT"
- name: Install Rust Toolchain
uses: ./.github/actions/rustup
with:
clippy: false
save-cache: true
shared-key: x86-cargo-test-ubuntu-latest-${{ steps.week_mark.outputs.EXPIRES_WEEK_MARK }}-${{ hashFiles('./Cargo.lock') }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.8
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: "pnpm"
token: ${{ secrets.GH_DOTCOM_TOKEN }}
- run: pnpm i
- name: Clean Sailfish cache
run: rm -rf target/debug/build/sailfish-*
- run: cargo test
build:
name: Mako Build
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }}
steps:
- uses: actions/checkout@v4
- name: Get cache expires mark
id: week_mark
run: echo "EXPIRES_WEEK_MARK=$(date +%U)" >> "$GITHUB_OUTPUT"
- name: Install Rust Toolchain
uses: ./.github/actions/rustup
with:
clippy: true
save-cache: true
shared-key: mako-build-${{ matrix.os }}-${{ steps.week_mark.outputs.EXPIRES_WEEK_MARK }}-${{ hashFiles('./Cargo.lock') }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.8
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: "pnpm"
token: ${{ secrets.GH_DOTCOM_TOKEN }}
- run: pnpm i
- name: Build
run: pnpm build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.os }}
path: |
./packages/mako/*.node
./packages/mako/binding.*
./packages/mako/dist
if-no-files-found: error
test_e2e:
name: E2E
needs: build
strategy:
fail-fast: false
matrix:
script: [ "test:e2e", "test:hmr", "test:umi" ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.8
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: "pnpm"
token: ${{ secrets.GH_DOTCOM_TOKEN }}
- run: |
pnpm i
pnpm playwright install chromium
- name: Download bindings
uses: actions/download-artifact@v4
with:
name: bindings-${{ matrix.os }}
path: packages/mako/
- name: LS
run: ls -l ./packages/mako
- name: Test E2E
env:
RUST_BACKTRACE: full
run: pnpm ${{ matrix.script }}
lint:
name: Clippy
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }}
steps:
- uses: actions/checkout@v4
- name: Get cache expires mark
id: week_mark
run: echo "EXPIRES_WEEK_MARK=$(date +%U)" >> "$GITHUB_OUTPUT"
- name: Install Rust Toolchain
uses: ./.github/actions/rustup
with:
clippy: true
shared-key: x86-cargo-test-ubuntu-latest-${{ steps.week_mark.outputs.EXPIRES_WEEK_MARK }}-${{ hashFiles('./Cargo.lock') }}
- name: Clippy
run: cargo clippy --locked -- -D warnings
format:
name: Format
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: ./.github/actions/rustup
with:
fmt: true
restore-cache: false
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.8
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: "pnpm"
token: ${{ secrets.GH_DOTCOM_TOKEN }}
- run: pnpm i
- run: pnpm biome:check
- run: cargo fmt --all -- --check
- name: Install Taplo CLI
uses: ./.github/actions/binstall
with:
packages: [email protected]
- run: taplo format --check
typos:
name: Spell Check
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }}
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected]
with:
files: .