Skip to content

Merge pull request #325 from matrix-org/release-v18.3.0 #1048

Merge pull request #325 from matrix-org/release-v18.3.0

Merge pull request #325 from matrix-org/release-v18.3.0 #1048

Workflow file for this run

name: CI
permissions: {}
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
types:
- opened
- reopened
- synchronize
- ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust
run: |
rustup install nightly
rustup default nightly
rustup component add rustfmt
- name: Check formatting
run: |
cargo fmt -- --check
(cd xtask && cargo fmt -- --check)
- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Install Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run eslint
run: pnpm lint:eslint
- name: Run prettier
run: pnpm lint:prettier
test:
name: test
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout the repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust
run: |
rustup install stable
rustup default stable
rustup target add wasm32-unknown-unknown
- name: Load cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
# Keep this in sync with:
# .github/workflows/latest-matrix-sdk-crypto.yml
# .github/workflows/release.yml
- name: Install Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build the WebAssembly + JavaScript binding
run: pnpm build
- name: Check typescript types
run: pnpm lint:types
- name: Test the JavaScript bindings
run: pnpm test
- name: Build the documentation
run: pnpm doc
# Upload the docs as a build artifiact, so they can be used in the
# deployment step below, or a subsequent workflow which uploads to netlify.
- name: Upload docs artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
name: docs
path: './docs/'
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
with:
artifact_name: docs