From 33a9d7d32c35db8a95388396161bb0780f80505c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8E=B2?= Date: Sat, 18 Jan 2025 23:37:48 +0000 Subject: [PATCH] feat: add lua tests to pipeline --- .github/workflows/cargo-release.yml | 11 +++++++++++ .github/workflows/gh-release.yml | 8 ++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cargo-release.yml b/.github/workflows/cargo-release.yml index 1b5d51c..c8a3784 100644 --- a/.github/workflows/cargo-release.yml +++ b/.github/workflows/cargo-release.yml @@ -18,12 +18,23 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 # Checkout the repository using the specified action + - name: Set Up Lua + uses: leafo/gh-actions-lua@v10 # Set up Lua + with: + luaVersion: "5.1" + - name: Set Up Rust uses: actions-rs/toolchain@v1 # Set up the Rust toolchain with: toolchain: stable # Use the stable Rust toolchain override: true # Override any existing toolchain configuration + - name: Build + run: cargo build + + - name: Test + run: lua.exe ltests/test.lua + - name: Install Cargo Release run: cargo install cargo-release # Install the cargo-release tool diff --git a/.github/workflows/gh-release.yml b/.github/workflows/gh-release.yml index e9d6898..e588230 100644 --- a/.github/workflows/gh-release.yml +++ b/.github/workflows/gh-release.yml @@ -24,13 +24,17 @@ jobs: toolchain: stable # Use the stable Rust toolchain override: true # Override any existing toolchain configuration - - name: Build DLL + - name: Build + env: + LUA_LIB_NAME: lua + LUA_LIB: lua5.1/ + LUA_INC: lua5.1/include run: cargo build --release # Build the project in release mode - name: Create GitHub Release uses: ncipollo/release-action@v1 # Use the release action to create a GitHub Release with: - artifacts: target/release/*.dll # Specify the artifacts to include in the release + artifacts: target/release/*.dll,dcs/json-rpc_*.lua # Specify the artifacts to include in the release tag: ${{ github.ref_name }} # Use the tag created by `cargo release` name: Release ${{ github.ref_name }} # Set the release name to the tag name body: |