diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 555adad6..fd10e86e 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -27,8 +27,7 @@ jobs: audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: rust audit - uses: actions-rs/audit-check@v1 + - uses: actions/checkout@v4 + - uses: rustsec/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/clippy-fmt.yml b/.github/workflows/clippy-fmt.yml index a3ccd17e..6d4b77e7 100644 --- a/.github/workflows/clippy-fmt.yml +++ b/.github/workflows/clippy-fmt.yml @@ -16,39 +16,33 @@ concurrency: jobs: clippy: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: install system deps + if: matrix.platform == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev libxdo-dev libwebkit2gtk-4.1-dev - - name: install stable - uses: actions-rs/toolchain@v1 + + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets --all-features -- -D warnings + - run: cargo clippy --all-targets --all-features -- -D warnings fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: install stable - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check diff --git a/.github/workflows/change-status-on-PR.yml b/.github/workflows/covector-status.yml similarity index 84% rename from .github/workflows/change-status-on-PR.yml rename to .github/workflows/covector-status.yml index 526f7347..aaa9217e 100644 --- a/.github/workflows/change-status-on-PR.yml +++ b/.github/workflows/covector-status.yml @@ -10,9 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - uses: actions/checkout@v4 - name: covector status uses: jbolda/covector/packages/action@covector-v0 id: covector diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 2b8918a1..a3f38a63 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: MIT -name: version or publish +name: covector version or publish on: push: @@ -19,22 +19,11 @@ jobs: successfulPublish: ${{ steps.covector.outputs.successfulPublish }} steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - uses: pnpm/action-setup@v2.2.2 - with: - version: 7 - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: 16 - check-latest: true - registry-url: 'https://registry.npmjs.org' + - uses: actions/checkout@v4 - name: cargo login run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }} + - name: git config run: | git config --global user.name "${{ github.event.pusher.name }}" @@ -55,8 +44,8 @@ jobs: uses: tauri-apps/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - branch: release/version-updates title: Apply Version Updates From Current Changes commit-message: 'apply version updates' labels: 'version updates' + branch: 'release' body: ${{ steps.covector.outputs.change }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36c0afb1..c972a0b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: install system deps if: contains(matrix.os, 'ubuntu') @@ -35,13 +35,5 @@ jobs: sudo apt-get update sudo apt-get install -y libgtk-3-dev libxdo-dev libwebkit2gtk-4.1-dev - - name: install stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - uses: actions-rs/cargo@v1 - with: - command: test + - uses: dtolnay/rust-toolchain@stable + - run: cargo test diff --git a/src/platform_impl/macos/mod.rs b/src/platform_impl/macos/mod.rs index 7ea03a4b..2c39c8d0 100644 --- a/src/platform_impl/macos/mod.rs +++ b/src/platform_impl/macos/mod.rs @@ -703,12 +703,12 @@ impl MenuChild { .as_mut() .unwrap() .entry(menu_id) - .or_insert_with(Vec::new) + .or_default() .push(NsMenuRef(id, ns_submenu)); self.ns_menu_items .entry(menu_id) - .or_insert_with(Vec::new) + .or_default() .push(NsMenuItemRef(ns_menu_item)); Ok(ns_menu_item) @@ -735,7 +735,7 @@ impl MenuChild { self.ns_menu_items .entry(menu_id) - .or_insert_with(Vec::new) + .or_default() .push(NsMenuItemRef(ns_menu_item)); Ok(ns_menu_item) @@ -772,7 +772,7 @@ impl MenuChild { self.ns_menu_items .entry(menu_id) - .or_insert_with(Vec::new) + .or_default() .push(NsMenuItemRef(ns_menu_item)); Ok(ns_menu_item) @@ -802,7 +802,7 @@ impl MenuChild { self.ns_menu_items .entry(menu_id) - .or_insert_with(Vec::new) + .or_default() .push(NsMenuItemRef(ns_menu_item)); Ok(ns_menu_item) @@ -835,7 +835,7 @@ impl MenuChild { self.ns_menu_items .entry(menu_id) - .or_insert_with(Vec::new) + .or_default() .push(NsMenuItemRef(ns_menu_item)); Ok(ns_menu_item)