Skip to content

Commit

Permalink
Fix Github Actions of Tauri Plugin with-api template (#6603)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
  • Loading branch information
Miniontoby and lucasfernog committed Apr 3, 2023
1 parent 5fdc616 commit a926b49
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 48 deletions.
7 changes: 7 additions & 0 deletions .changes/cli-templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"cli.rs": "patch"
"cli.js": "patch"
---

Fix Outdated Github Actions in the Plugin Templates `with-api` and `backend`

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
permissions:
issues: write
checks: write
{{{{/raw}}}}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: covector status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install rustfmt with stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install webkit2gtk
run: |
sudo apt-get update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
- uses: actions/checkout@v3
- uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
permissions:
issues: write
checks: write
{{{{/raw}}}}
22 changes: 10 additions & 12 deletions tooling/cli/templates/plugin/with-api/.github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: install webkit2gtk
- 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: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
uses: dtolnay/rust-toolchain@stable
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path=Cargo.toml --all-targets --all-features -- -D warnings
name: clippy
components: clippy

- uses: Swatinem/rust-cache@v2

- run: cargo clippy --manifest-path=Cargo.toml --all-targets --all-features -- -D warnings
{{{{/raw}}}}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
Expand Down
20 changes: 9 additions & 11 deletions tooling/cli/templates/plugin/with-api/.github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Install rustfmt with stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v3

- name: Install rustfmt with stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=Cargo.toml --all -- --check

- uses: Swatinem/rust-cache@v2

- run: cargo fmt --manifest-path=Cargo.toml --all -- --check
{{{{/raw}}}}
29 changes: 13 additions & 16 deletions tooling/cli/templates/plugin/with-api/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,21 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- 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
- uses: Swatinem/rust-cache@v2

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=Cargo.toml --release
- name: Run tests
run: cargo test --manifest-path=Cargo.toml --release
{{{{/raw}}}}

0 comments on commit a926b49

Please sign in to comment.