Skip to content

refactor(lib): remove unused imports #520

refactor(lib): remove unused imports

refactor(lib): remove unused imports #520

Workflow file for this run

name: "Web"
on:
- push
jobs:
unit_test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install rust
uses: dtolnay/rust-toolchain@stable
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: npm ci
- name: Build wasm only
run: npm run build:wasm
- name: Run tests
run: npm run test
e2e_test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install rust
uses: dtolnay/rust-toolchain@stable
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run e2e tests
run: npm run e2etest
- uses: actions/upload-artifact@v4
with:
name: playwright-report
path: web/playwright-report/
deploy_to_pages:
runs-on: ubuntu-latest
needs: ["unit_test", "e2e_test"]
if: startsWith(github.ref, 'refs/tags/v')
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install rust
uses: dtolnay/rust-toolchain@stable
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: web/dist/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4