Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: extract individual test.yml #908

Merged
merged 12 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/autofix-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches: ["main" ]
paths:
- '.github/workflows/autofix-rust.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/**'
Expand All @@ -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
Expand Down
File renamed without changes.
47 changes: 1 addition & 46 deletions .github/workflows/ci.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading