Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/lint-test-clippy.yaml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Test

on:
push:
branches:
- main
pull_request:

permissions: {} # No GITHUB_TOKEN permissions, as we don't use it.

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Setup rust
uses: dtolnay/rust-toolchain@9a1d20035bdbcbc899baabe1e402e85bc33639bc # 1.90
with:
components: rustfmt, clippy

- name: Setup sccache
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9

- name: Run fmt
run: cargo fmt -- --check

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose --workspace --all-targets --no-fail-fast

- name: Run clippy
run: cargo clippy --all-features --workspace -- -Dwarnings

npm-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Setup rust
uses: dtolnay/rust-toolchain@9a1d20035bdbcbc899baabe1e402e85bc33639bc # 1.90
with:
components: rustfmt, clippy

- name: Setup sccache
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9

- name: Run wasm-pack
run: cargo install wasm-pack && wasm-pack build --release --target web --scope mdn

- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
registry-url: "https://registry.npmjs.org/"
node-version-file: ".nvmrc"
package-manager-cache: false

- name: Bump version (prerelease)
working-directory: ./pkg
run: npm version prerelease

- name: Publish (dry-run)
working-directory: ./pkg
run: npm publish --dry-run --access public --provenance --tag test
Loading