ee3270ce1c
Covers the "Node.js 20 is deprecated" warning emitted by actions/checkout, actions/setup-node, actions/cache, actions/upload-artifact and actions/download-artifact on their older releases. Every bumped line carries an inline `# kilocode_change` marker since these workflow files are shared with upstream OpenCode. When upstream bumps its own action versions we just drop the markers on merge.
102 lines
3.0 KiB
YAML
102 lines
3.0 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
# Keep every run on main so cancelled checks do not pollute the default branch
|
|
# commit history. PRs and other branches still share a group and cancel stale runs.
|
|
group: ${{ case(github.ref == 'refs/heads/main', format('{0}-{1}', github.workflow, github.run_id), format('{0}-{1}', github.workflow, github.event.pull_request.number || github.ref)) }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
|
|
jobs:
|
|
unit:
|
|
name: unit (${{ matrix.settings.name }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
settings:
|
|
- name: linux
|
|
host: blacksmith-4vcpu-ubuntu-2404 # kilocode_change
|
|
- name: windows
|
|
host: blacksmith-4vcpu-windows-2025 # kilocode_change
|
|
runs-on: ${{ matrix.settings.host }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6 # kilocode_change
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v6 # kilocode_change
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Setup Bun
|
|
uses: ./.github/actions/setup-bun
|
|
|
|
- name: Configure git identity
|
|
run: |
|
|
git config --global user.email "kilo-maintainer[bot]@users.noreply.github.com"
|
|
git config --global user.name "kilo-maintainer[bot]"
|
|
|
|
- name: Cache Turbo
|
|
uses: actions/cache@v5 # kilocode_change
|
|
with:
|
|
path: node_modules/.cache/turbo
|
|
key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}-${{ github.sha }}
|
|
restore-keys: |
|
|
turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}-
|
|
turbo-${{ runner.os }}-
|
|
|
|
- name: Run unit tests
|
|
run: bun turbo test:ci
|
|
env:
|
|
KILO_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }}
|
|
|
|
- name: Publish unit reports
|
|
if: always()
|
|
uses: mikepenz/action-junit-report@v6
|
|
with:
|
|
report_paths: packages/*/.artifacts/unit/junit.xml
|
|
check_name: "unit results (${{ matrix.settings.name }})"
|
|
detailed_summary: true
|
|
include_time_in_summary: true
|
|
fail_on_failure: false
|
|
|
|
- name: Upload unit artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v7 # kilocode_change
|
|
with:
|
|
name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }}
|
|
include-hidden-files: true
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|
|
path: packages/*/.artifacts/unit/junit.xml
|
|
|
|
required:
|
|
name: test (linux)
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
needs:
|
|
- unit
|
|
if: always()
|
|
steps:
|
|
- name: Verify upstream test jobs passed
|
|
run: |
|
|
echo "unit=${{ needs.unit.result }}"
|
|
test "${{ needs.unit.result }}" = "success"
|