Repository navigation
76 lines (72 loc) · 2.33 KB
/
Copy pathci.yml
File metadata and controls
76 lines (72 loc) · 2.33 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make daemons
# Each package has 15 minutes: ui takes most of 10 on these machines. The report
# prints what failed and what took the time; test.json keeps every test's timing.
- name: go test
shell: bash
run: |
status=0
go test -json -timeout 15m ./... > test.json || status=$?
go run ./scripts/testreport test.json
exit $status
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-json-${{ matrix.os }}
path: test.json
retention-days: 7
- run: make lint
# The cloud's database code against Postgres, as the cloud runs in
# production; the tests above run it on SQLite.
cloud-postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: cloud
POSTGRES_PASSWORD: cloud
POSTGRES_DB: cloudtest
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U cloud" --health-interval 2s --health-timeout 5s --health-retries 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go test ./cloud/...
env:
ENOWX_CLOUD_TEST_POSTGRES: postgres://cloud:cloud@localhost:5432/cloudtest?sslmode=disable
# What must look the same on Windows as elsewhere: icons draw the
# pixels recorded on the other systems.
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go test ./ui/icon ./core/iconlib
# Agents' commands fit Windows' command line, run through real PowerShell and
# cmd.exe (docs/agents.md).
- run: go test ./core/agent -run 'TestMoveToFiles|TestShortenGuide'
- run: go test ./core/diag
- run: go test ./daemon -run 'TestPsQuote|TestPsThenShell|TestCommandsFit|TestLongPrompt|TestAgentThroughCmdShim'