From 793b475473ec3a2a1268154f30bbf95a5cfc3879 Mon Sep 17 00:00:00 2001 From: wtto00 Date: Thu, 6 Jun 2024 20:26:19 +0800 Subject: [PATCH] fix some error in github action ci --- .github/workflows/clippy.yml | 7 +------ .github/workflows/test.yml | 14 +++++--------- src/lib.rs | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index f7b83be..21b936a 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -11,18 +11,13 @@ on: jobs: clippy: - runs-on: ubuntu-latest + runs-on: macos-latest strategy: fail-fast: false steps: - uses: actions/checkout@v3 - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y webkit2gtk-4.0 - - name: Install clippy with stable toolchain uses: dtolnay/rust-toolchain@stable with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6548f57..15a6f14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,13 +15,15 @@ on: jobs: build-and-test: - runs-on: ${{ matrix.os }} + runs-on: macos-latest strategy: fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] steps: + - uses: SwiftyLab/setup-swift@latest + with: + swift-version: "5.10" + - uses: actions/checkout@v3 - name: Install stable toolchain @@ -29,12 +31,6 @@ jobs: with: components: clippy - - name: Install Linux dependencies - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y webkit2gtk-4.0 - - uses: Swatinem/rust-cache@v2 - name: Run tests diff --git a/src/lib.rs b/src/lib.rs index c9a809e..9b9ea86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,7 +126,7 @@ fn request_pruchase( unsafe { swift_request_pruchase( product_identifier.as_str().into(), - quantity.into(), + quantity, application_user_name.unwrap_or_default().as_str().into(), ); }