-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (81 loc) · 3.28 KB
/
Copy pathtest.yml
File metadata and controls
94 lines (81 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: test
on:
push:
branches:
- local/amicode
pull_request:
workflow_dispatch:
concurrency:
# Keep every run on the default branch 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/local/amicode', 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:
# linux only. opencode.lock.json ships darwin-arm64 + linux-x64, so a
# windows unit lane gates a platform this fork does not distribute, and
# it is the ~50min long pole on every run. It was also red on arrival
# for a reason unrelated to any change under test (POSIX path separators
# hardcoded in amicode-vaults.test.ts — harmoniqs/opencode#76).
settings:
- name: linux
host: ubuntu-latest
runs-on: ${{ matrix.settings.host }}
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
# The pasqal connection-route tests spawn the validator through the REAL
# spawn path, with a recording stub standing in for pasqal_validate.py.
# In production amicode provisions <opsDir>/venvs/pasqal-connector and
# passes it as AMICO_PYTHON (harmoniqs/amicode#189), so the interpreter is
# always a real python. The stub needs an interpreter but NOT the SDK.
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Setup Bun
uses: ./.github/actions/setup-bun
- name: Configure git identity
run: |
git config --global user.email "bot@opencode.ai"
git config --global user.name "opencode"
- name: Cache Turbo
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
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
timeout-minutes: 45
run: GITHUB_ACTIONS=false bun turbo test --output-logs=errors-only --log-order=grouped --log-prefix=task
env:
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }}
- name: Check generated client
if: runner.os == 'Linux'
working-directory: packages/client
run: bun run check:generated
- name: Run HttpApi exerciser gates
if: runner.os == 'Linux'
working-directory: packages/opencode
run: bun run test:httpapi