2023-02-19 16:17:49 +03:00
|
|
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
2021-04-11 01:09:09 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-05-22 18:52:44 +03:00
|
|
|
name: test and lint bundler
|
2020-07-15 14:14:11 +03:00
|
|
|
|
|
|
|
on:
|
2021-04-22 23:34:46 +03:00
|
|
|
push:
|
|
|
|
branches:
|
2021-04-23 21:34:38 +03:00
|
|
|
- dev
|
2023-06-17 15:41:22 +03:00
|
|
|
- 1.x
|
2020-07-15 14:14:11 +03:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2020-07-16 02:05:07 +03:00
|
|
|
- '.github/workflows/test-bundler.yml'
|
2021-04-12 07:59:25 +03:00
|
|
|
- 'tooling/bundler/**'
|
2022-02-14 02:27:21 +03:00
|
|
|
|
2020-07-15 14:14:11 +03:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
2022-02-14 02:27:21 +03:00
|
|
|
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
2020-07-15 14:14:11 +03:00
|
|
|
|
2022-04-21 21:09:57 +03:00
|
|
|
concurrency:
|
2022-04-27 01:04:10 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
2022-04-21 21:09:57 +03:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-07-15 14:14:11 +03:00
|
|
|
jobs:
|
2023-05-22 18:52:44 +03:00
|
|
|
test:
|
2020-07-15 14:14:11 +03:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-11-05 00:26:30 +03:00
|
|
|
|
2020-07-15 14:14:11 +03:00
|
|
|
- name: install stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2021-04-22 23:34:46 +03:00
|
|
|
|
2022-11-05 00:26:30 +03:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2022-11-05 19:14:56 +03:00
|
|
|
with:
|
|
|
|
workspaces: tooling/bundler
|
2021-04-22 23:34:46 +03:00
|
|
|
|
2020-07-15 14:14:11 +03:00
|
|
|
- name: test
|
|
|
|
run: |
|
2021-04-12 07:59:25 +03:00
|
|
|
cd ./tooling/bundler
|
2020-07-15 14:14:11 +03:00
|
|
|
cargo test
|
|
|
|
|
2023-05-22 18:52:44 +03:00
|
|
|
fmt:
|
2020-07-15 14:14:11 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-02-14 00:21:15 +03:00
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2022-06-25 04:01:13 +03:00
|
|
|
toolchain: stable
|
2022-02-14 00:21:15 +03:00
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --manifest-path ./tooling/bundler/Cargo.toml --all -- --check
|
|
|
|
|
2023-05-22 18:52:44 +03:00
|
|
|
clippy:
|
2022-02-14 00:21:15 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-11-05 00:26:30 +03:00
|
|
|
|
2022-02-14 00:21:15 +03:00
|
|
|
- name: install minimal stable with clippy and rustfmt
|
2021-04-22 23:34:46 +03:00
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2022-02-14 00:21:15 +03:00
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2022-11-05 19:14:56 +03:00
|
|
|
default: true
|
2022-02-14 00:21:15 +03:00
|
|
|
components: rustfmt, clippy
|
|
|
|
|
2022-11-05 00:26:30 +03:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2022-02-14 00:21:15 +03:00
|
|
|
with:
|
2022-11-05 00:26:30 +03:00
|
|
|
workspaces: tooling/bundler
|
2021-04-22 23:34:46 +03:00
|
|
|
|
2020-07-15 14:14:11 +03:00
|
|
|
- name: clippy check
|
|
|
|
uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2021-04-12 07:59:25 +03:00
|
|
|
args: --manifest-path ./tooling/bundler/Cargo.toml --all-targets -- -D warnings
|
2020-07-15 14:14:11 +03:00
|
|
|
name: bundler
|