-
Notifications
You must be signed in to change notification settings - Fork 18
124 lines (105 loc) · 3.96 KB
/
Copy pathci.yaml
File metadata and controls
124 lines (105 loc) · 3.96 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
NODE_OPTIONS: '--max_old_space_size=8192'
jobs:
build:
name: Setup and build project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- name: Check the TextMate grammar is up to date
run: |
(git diff-index --name-status HEAD | grep "cypher.json" && (echo "Run pnpm build and commit an up to date cypher.json file please" && exit 1)) || echo "\n\nTextMate grammar is up to date"
lint-and-format:
name: Run oxlint and check formatting
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- name: Check there are no linting errors
run: pnpm lint
- name: Check relative imports have .js extensions
# Ideally we'd use moduleResolution: "nodenext" which enforces .js extensions at the
# TypeScript level, but antlr4@4.13.2's type declarations (.d.cts) use extensionless
# imports that break nodenext resolution. Once we switch to depending on antlr4-ng,
# both directly and in our (currently vendored) antlr4-c3 dependency, we can switch
# to nodenext and remove this grep-based check.
# We also can't use oxlint's import/extensions rule because it doesn't support
# TypeScript's .js-in-source convention: https://github.com/oxc-project/oxc/issues/19431
run: pnpm check-imports
- name: Check formatting
run: pnpm format:check
unit-test:
name: Unit tests
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- name: Run tests
run: pnpm test
test-polling:
name: Polling integration tests
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- name: Run tests
run: pnpm --filter @neo4j-cypher/query-tools test:polling
firefox-react-codemirror-e2e-test:
name: Firefox React Codemirror E2E tests
needs: build
timeout-minutes: 30
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- uses: ./.github/actions/codemirror-e2e-tests
with:
browser: firefox
chromium-react-codemirror-e2e-test:
name: Chromium React Codemirror E2E tests
needs: build
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- uses: ./.github/actions/codemirror-e2e-tests
with:
browser: chromium
vscode-webview-test:
name: VSCode Webview tests
needs: build
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- name: Run e2e test
# We need a graphics server to run integration tests with VSCode
run: xvfb-run -a pnpm --filter neo4j-for-vscode test:webviews
vscode-api-and-unit-tests:
name: VSCode API and Unit tests
needs: build
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-and-build
- name: Run tests
run: xvfb-run -a pnpm --filter neo4j-for-vscode test:apiAndUnit