Skip to content

build: remove quotes in action yml #149

build: remove quotes in action yml

build: remove quotes in action yml #149

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
env:
JMDICT_PATH: crates/yomikiri-dictionary-generator/jmdict/jmdict_english.xml
JMNEDICT_PATH: crates/yomikiri-dictionary-generator/jmdict/jmnedict.xml
DICTIONARY_PATH: crates/yomikiri-dictionary-generator/files/english.yomikiridict
UNIDIC_OUTPUT_PATH: crates/unidic/output
jobs:
test:
runs-on: macos-latest
timeout-minutes: 45
name: "Lint, Test, Build web extension"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: "next-9"
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install cargo
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-ios
- name: Install pnpm deps
run: pnpm install
- name: Get version
id: version
run: echo "VERSION=$(pnpm run --silent print-version)" >> "$GITHUB_OUTPUT"
- name: Hash root Cargo.toml and Cargo.lock
id: cargo-hash
run: echo "HASH=${{hashFiles('./Cargo.lock', './Cargo.toml')}}" >> "$GITHUB_OUTPUT"
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
- name: Formatting
run: pnpm run check-format
- name: Install wasm-pack
run: pnpm add -g wasm-pack
- name: Cache unidic
uses: actions/cache@v4
with:
path: crates/unidic/original
key: unidic-2.1.2
- name: Cache jmdict
uses: actions/cache@v4
with:
path: ${{env.JMDICT_PATH}}
key: jmdict-english-xml-${{steps.version.outputs.VERSION}}
- name: Cache jmnedict
uses: actions/cache@v4
with:
path: ${{env.JMNEDICT_PATH}}
key: jmnedict-xml-${{steps.version.outputs.VERSION}}
- name: Build yomikiri-dictionary-generator crate
run: cargo build
working-directory: ./crates/yomikiri-dictionary-generator
- name: Cache yomikiri dictionary
uses: actions/cache@v4
id: cache-yomikiri-dictionary
with:
path: ${{env.DICTIONARY_PATH}}
key: yomikiridict-${{ steps.cargo-hash.outputs.HASH }}-${{ hashFiles('./target/debug/yomikiri-dictionary-generator', './crates/dictionary-generator/Cargo.toml', env.JMDICT_PATH, env.JMNEDICT_PATH) }}
- name: Generate yomikiri dictionary
if: steps.cache-yomikiri-dictionary.outputs.cache-hit != 'true'
run: pnpm run generate:dictionary
- name: Build yomikiri-unidic crate
run: cargo build
working-directory: ./crates/unidic
- name: Cache unidic output
uses: actions/cache@v4
id: cache-unidic
with:
path: ${{env.UNIDIC_OUTPUT_PATH}}
key: unidic-${{ steps.cargo-hash.outputs.HASH }}-${{ hashFiles('./target/debug/yomikiri-unidic', './crates/unidic/Cargo.toml', env.DICTIONARY_PATH, './crates/unidic/original/**') }}
- name: Generate unidic files
if: steps.cache-unidic.outputs.cache-hit != 'true'
run: pnpm run generate:unidic
- name: Generate backend wasm
run: pnpm run generate:backend-wasm
- name: Generate backend ios
run: pnpm run generate:backend-ios
- name: Generate licenses
run: pnpm run generate:licenses
- name: Lint
run: pnpm run lint
- name: Test
run: pnpm run test
- name: Build web
run: pnpm run build:chrome && pnpm run build:firefox && pnpm run build:ios