From 27c5707d87c30931cc2d1b0b3828150cb4ce7f68 Mon Sep 17 00:00:00 2001 From: Ammar Abou Zor Date: Tue, 30 Jul 2024 11:42:37 +0200 Subject: [PATCH] Build CLI: Basic integrations in CI system - Use the CLI tool with GitHub Actions for Pull Requests along side with the current ruby actions for comparison - Install latest rust manually instead of the deprecated GitHub Action - Use Cargo cache action for speed up installing the build CLI tool - Dependencies are installed manually for now but this can improved --- .github/workflows/pullrequest_check.yml | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/.github/workflows/pullrequest_check.yml b/.github/workflows/pullrequest_check.yml index 833bb91546..a382e1413c 100644 --- a/.github/workflows/pullrequest_check.yml +++ b/.github/workflows/pullrequest_check.yml @@ -3,6 +3,56 @@ name: Checks on: [pull_request] jobs: + all_lint: + name: Run all lints using CLI tool + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Latest Rust + run: | + rustup update --no-self-update ${{ env.RUST_CHANNEL }} + rustup default ${{ env.RUST_CHANNEL }} + - name: Rust Cache + uses: Swatinem/rust-cache@v2.7.3 + - name: Install wasm-pack + run: cargo install wasm-pack + - name: Install nj-cli + run: cargo install nj-cli + - name: Install Build CLI tool + run: cargo install --path=cli + - name: libudev-dev + run: sudo apt-get install -y libudev-dev + - name: enable corepack for yarnpkg upgrade + run: corepack enable + - name: Run Lints + run: cargo chipmunk lint -r + all_test: + name: Run all tests using CLI tool + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Latest Rust + run: | + rustup update --no-self-update ${{ env.RUST_CHANNEL }} + rustup default ${{ env.RUST_CHANNEL }} + - name: Rust Cache + uses: Swatinem/rust-cache@v2.7.3 + - name: Install wasm-pack + run: cargo install wasm-pack + - name: Install nj-cli + run: cargo install nj-cli + - name: Install Build CLI tool + run: cargo install --path=cli + - name: libudev-dev + run: sudo apt-get install -y libudev-dev + - name: enable corepack for yarnpkg upgrade + run: | + npm install tslib + corepack enable + - name: Run Tests + run: cargo chipmunk test -r ts_lint: runs-on: ubuntu-latest steps: