Skip to content

Date range in DatePicker #54

Date range in DatePicker

Date range in DatePicker #54

name: Add Components
on:
push:
branches:
- main
paths:
- /**
- preview/**/*.rs
- preview/**/Cargo.toml
- primitives/**/*.rs
- primitives/**/Cargo.toml
- .github/**
- Cargo.toml
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
paths:
- /**
- preview/**/*.rs
- preview/**/Cargo.toml
- primitives/**/*.rs
- primitives/**/Cargo.toml
- .github/**
- Cargo.toml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
add-all-components:
if: github.event.pull_request.draft == false
name: Add All Components
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
version: 1.0
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "false"
- uses: cargo-bins/cargo-binstall@main
- name: Install CLI
run: cargo binstall dioxus-cli -y --force --version 0.7.0
- name: Add components and check
run: |
cd test-harness
# Add dependencies manually; TODO: remove this once dx components supports local dependencies
dx components add calendar,popover --path ..
# Add all components
dx components add --all --path .. --force
# Switch to the local version of dioxus-primitives
cargo add dioxus-primitives --path ../primitives
# Make sure it still builds
cargo check --all-features
add-each-component:
if: github.event.pull_request.draft == false
name: Add Each Components
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
version: 1.0
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
cache-on-failure: "false"
- uses: cargo-bins/cargo-binstall@main
- name: Install CLI
run: cargo binstall dioxus-cli -y --force --version 0.7.0
- name: Add each component and check
run: |
cd preview/src/components/
for file in *; do
if [ -d "$file" ]; then
echo "Testing component: $file"
else
continue
fi
# Go to test harness
cd ../../../test-harness
# Add dependencies manually; TODO: remove this once dx components supports local dependencies
if [ "$file" = "date_picker" ]; then
dx components add calendar,popover --path ..
fi
# Add the component
dx components add "$file" --path ..
# Switch to the local version of dioxus-primitives
cargo add dioxus-primitives --path ../primitives
# Make sure it still builds
cargo check --all-features
# Undo changes
dx components remove --all --path ..
cd ../preview/src/components/
done