chore: extract individual test.yml (#908)

* chore: extract individual test.yml

* update

* update test-intellij

* add test-tabby-ui

* update

* update

* update

* update

* update

* update

* update

* update
add-prompt-lookup
Meng Zhang 2023-11-28 14:21:12 +08:00 committed by GitHub
parent 316067cc53
commit b47abc661d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 98 additions and 84 deletions

View File

@ -4,13 +4,14 @@ on:
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/autofix-python.yml'
- 'python/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

View File

@ -4,6 +4,7 @@ on:
pull_request:
branches: ["main" ]
paths:
- '.github/workflows/autofix-rust.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**'
@ -13,7 +14,7 @@ permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

View File

@ -6,16 +6,9 @@ on:
tags:
- 'v*'
- 'nightly'
pull_request:
branches: ["main" ]
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**'
- 'ee/tabby-webserver/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
@ -24,44 +17,6 @@ env:
RUST_TOOLCHAIN: 1.73.0
jobs:
tests:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Sccache cache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.4.0"
- name: Cargo registry cache
uses: actions/cache@v3
with:
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }}
restore-keys: |
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
cargo-${{ runner.os }}-
path: |
~/.cargo/registry
~/.cargo/git
- run: bash ./ci/prepare_build_environment.sh
- name: Run unit tests
run: cargo test --bin tabby --lib
release-binary:
if: github.event_name != 'pull_request'
needs: tests

View File

@ -1,19 +1,20 @@
name: Test IntelliJ Plugin
name: Test IntelliJ
on:
push:
branches: [ main ]
paths:
- '.github/workflows/intellij-test.yml'
- 'clients/intellij/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/intellij-test.yml'
- '.github/workflows/test-intellij.yml'
- 'clients/intellij/**'
concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout

58
.github/workflows/test-rust.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: Test Rust
on:
pull_request:
branches: [ "main" ]
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**'
- 'ee/tabby-webserver/**'
- '.github/workflows/test-rust.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
env:
RUST_TOOLCHAIN: 1.73.0
jobs:
tests:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Sccache cache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.4.0"
- name: Cargo registry cache
uses: actions/cache@v3
with:
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }}
restore-keys: |
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
cargo-${{ runner.os }}-
path: |
~/.cargo/registry
~/.cargo/git
- run: bash ./ci/prepare_build_environment.sh
- name: Run unit tests
run: cargo test --bin tabby --lib

View File

@ -1,23 +1,22 @@
name: Test tabby-agent
name: Test Tabby Agent
on:
push:
branches: [ main ]
paths:
- '.github/workflows/tabby-agent-test.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/tabby-agent-test.yml'
- '.github/workflows/test-tabby-agent.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'
concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout

View File

@ -1,19 +1,20 @@
name: Test tabby-ui
name: Test Tabby UI
on:
push:
branches: [ main ]
paths:
- '.github/workflows/tabby-ui-test.yml'
- 'ee/tabby-ui/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/tabby-ui-test.yml'
- '.github/workflows/test-tabby-ui.yml'
- 'ee/tabby-ui/**'
concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout

View File

@ -1,25 +1,23 @@
name: Test VSCode Extension
on:
push:
branches: [ main ]
paths:
- '.github/workflows/vscode-test.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'
- 'clients/vscode/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/vscode-test.yml'
- '.github/workflows/test-vscode.yml'
- 'package.json'
- 'yarn.lock'
- 'clients/tabby-agent/**'
- 'clients/vscode/**'
concurrency:
group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }}
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true
jobs:
test:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout