fixed t_string and updated docs #746
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
- v0.4 | |
pull_request: | |
branches: | |
- master | |
- v0.4 | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lib_test: | |
name: Test leptos_i18n package | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@v4 | |
- name: "Load cargo toolchain" | |
uses: dtolnay/rust-toolchain@stable | |
- name: "Install cargo-all-features" | |
run: cargo install cargo-all-features --locked | |
- name: "Test all features" | |
working-directory: "leptos_i18n" | |
run: cargo test-all-features | |
macros_test: | |
# Why not also use cargo-all-features with the macros package ? | |
# Because all features are forwarded from leptos_i18n, | |
# so if some features mix creates a problem they will appear in leptos_i18n tests. | |
# All leptos_i18n_macro tests don't require any feature flag, so no need to test each feature and matchup | |
# just run once with default, this speeds up CI | |
name: Test leptos_i18n_macro package | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@v4 | |
- name: "Load cargo toolchain" | |
uses: dtolnay/rust-toolchain@stable | |
- name: "Run tests" | |
run: cargo test --package leptos_i18n_macro | |
test_ssr_examples: | |
name: Test ${{ matrix.examples }} example | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
examples: | |
[ | |
hello_world_actix, | |
hello_world_axum, | |
workspace, | |
axum_island, | |
routing_ssr, | |
] | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@v4 | |
- name: "Setup Node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: "Setup Rust toolchain" | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: "stable" | |
targets: "wasm32-unknown-unknown" | |
- name: "Install cargo-leptos" | |
run: cargo install cargo-leptos --locked | |
- name: "Build ${{ matrix.examples }} example" | |
working-directory: examples/ssr/${{ matrix.examples }} | |
run: cargo leptos build | |
- name: "Build e2e utils" | |
working-directory: examples/utils | |
run: npm ci | |
- name: "Install Playwright" | |
working-directory: examples/ssr/${{ matrix.examples }} | |
run: | | |
npm ci | |
npx playwright install --with-deps | |
- name: "e2e testing ${{ matrix.examples }} example" | |
id: e2e | |
working-directory: examples/ssr/${{ matrix.examples }} | |
run: npx playwright test | |
- name: "Upload e2e report" | |
uses: actions/upload-artifact@v4 | |
# upload artifact only if e2e test failed | |
if: ${{ steps.e2e.outcome == 'failure' && !cancelled() }} | |
with: | |
name: playwright-report-${{ matrix.examples }} | |
path: examples/ssr/${{ matrix.examples }}/playwright-report/ | |
test_csr_examples: | |
name: Test ${{ matrix.examples }} example | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
examples: | |
[ | |
counter, | |
counter_ranges, | |
interpolation, | |
namespaces, | |
subkeys, | |
yaml, | |
routing_csr, | |
subcontext, | |
] | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@v4 | |
- name: "Setup Node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: "Setup Rust toolchain" | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: "stable" | |
targets: "wasm32-unknown-unknown" | |
- name: "Install trunk" | |
run: cargo install trunk --locked | |
- name: "Build ${{ matrix.examples }} example" | |
working-directory: examples/csr/${{ matrix.examples }} | |
run: trunk build | |
- name: "Build e2e utils" | |
working-directory: examples/utils | |
run: npm ci | |
- name: "Install Playwright" | |
working-directory: examples/csr/${{ matrix.examples }} | |
run: | | |
npm ci | |
npx playwright install --with-deps | |
- name: "e2e testing ${{ matrix.examples }} example" | |
id: e2e | |
working-directory: examples/csr/${{ matrix.examples }} | |
run: npx playwright test | |
- name: "Upload e2e report" | |
uses: actions/upload-artifact@v4 | |
# upload artifact only if e2e test failed | |
if: ${{ steps.e2e.outcome == 'failure' && !cancelled() }} | |
with: | |
name: playwright-report-${{ matrix.examples }} | |
path: examples/csr/${{ matrix.examples }}/playwright-report/ | |
test_suite: | |
name: Test suite ${{ matrix.tests_suites }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
tests_suites: [json, yaml, namespaces] | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@v4 | |
- name: "Install wasm32-unknown-unknown" | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: "stable" | |
- name: Running test suite ${{ matrix.tests_suites }} | |
working-directory: tests/${{ matrix.tests_suites }} | |
run: cargo test |