From 577a466906348d97de65b447c08892e6b9842c4c Mon Sep 17 00:00:00 2001 From: Tobias Reiher <15232394+treiher@users.noreply.github.com> Date: Mon, 18 Dec 2023 22:56:11 +0100 Subject: [PATCH] FIXME --- .github/workflows/tests.yml | 45 ++++++++++++++++++++++++++++++++++--- Makefile | 9 +++++--- frontend/Cargo.toml | 3 +++ 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c2f3714..de84ba6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,6 @@ on: env: RUST_VERSION: "1.68.2" - TRUNK_VERSION: "0.17.5" POETRY_VERSION: "1.7.1" POETRY_DYNAMIC_VERSIONING_VERSION: "1.2.0" @@ -82,7 +81,7 @@ jobs: - name: Install dependencies run: | sudo apt install libarchive-tools - cargo install --locked trunk@${{ env.TRUNK_VERSION }} + cargo build --manifest-path=frontend/Cargo.toml - name: Test run: | make test_installation @@ -156,7 +155,47 @@ jobs: run: | sudo apt install libarchive-tools poetry install - cargo install --locked trunk@${{ env.TRUNK_VERSION }} + cargo build --manifest-path=frontend/Cargo.toml + - name: Use latest dependencies + run: | + rustup update stable && rustup default stable + cargo update --manifest-path=frontend/Cargo.toml + poetry lock - name: Test run: | make test_e2e + + test_latest_dependencies: + name: Latest Dependencies + #if: ${{ github.event_name == "schedule" } + runs-on: ubuntu-20.04 + env: + python-version: "3.10" + steps: + - uses: actions/checkout@v3 + - name: Install Poetry + run: | + pipx install poetry==${{ env.POETRY_VERSION }} + pipx inject poetry poetry-dynamic-versioning==${{ env.POETRY_DYNAMIC_VERSIONING_VERSION }} + - name: Set up Python ${{ env.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.python-version }} + cache: poetry + - name: Set up Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --target wasm32-unknown-unknown --profile minimal + echo ~/.cargo/bin >> $GITHUB_PATH + - uses: Swatinem/rust-cache@v2 + with: + workspaces: frontend + - name: Install dependencies + run: | + sudo apt install libarchive-tools + poetry lock + poetry install + cargo update --manifest-path=frontend/Cargo.toml + cargo build --manifest-path=frontend/Cargo.toml + - name: Test + run: | + make test diff --git a/Makefile b/Makefile index 2df4af2..19a637f 100644 --- a/Makefile +++ b/Makefile @@ -18,16 +18,19 @@ export SQLALCHEMY_WARN_20=1 all: check test -.PHONY: check check_frontend check_backend check_black check_ruff check_mypy +.PHONY: check check_frontend check_backend check_poetry check_black check_ruff check_mypy -check: check_frontend check_backend +check: check_poetry check_frontend check_backend check_frontend: cargo fmt --manifest-path=frontend/Cargo.toml -- --check cargo check --manifest-path=frontend/Cargo.toml cargo clippy --manifest-path=frontend/Cargo.toml -- --warn clippy::pedantic --deny warnings -check_backend: check_black check_ruff check_mypy +check_backend: check_poetry check_black check_ruff check_mypy + +check_poetry: + poetry check check_black: poetry run black --check --diff $(PYTHON_PACKAGES) diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index 3d5473a..7bef263 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -14,3 +14,6 @@ serde_json = "1.0" slice-group-by = "0.3" wasm-bindgen = "=0.2.74" web-sys = { version = "0.3", features = ["AudioContext", "AudioDestinationNode", "AudioNode", "AudioParam", "GainNode", "Notification", "NotificationOptions", "NotificationPermission", "OscillatorNode", "ScrollBehavior", "ScrollIntoViewOptions", "ScrollLogicalPosition", "ScrollToOptions"] } + +[dev-dependencies] +trunk = "0.17.5"