Repository navigation
61 lines (50 loc) · 1.49 KB
/
Copy pathcoder-module.yaml
File metadata and controls
61 lines (50 loc) · 1.49 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
name: Coder Module
on:
push:
branches: [main]
paths:
- 'coder-module/**'
- '.github/workflows/coder-module.yaml'
- 'scripts/ci/check-coder-module.sh'
pull_request:
paths:
- 'coder-module/**'
- '.github/workflows/coder-module.yaml'
- 'scripts/ci/check-coder-module.sh'
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
jobs:
test:
name: Validate and Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: coder-module
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- name: Install Bun
uses: oven-sh/setup-bun@v2
- name: Check formatting
run: terraform fmt -check -diff
- name: Validate
run: |
terraform init -input=false
terraform validate
# The rendered coder_script is what actually runs in a workspace, so a bash syntax error here is a broken module.
- name: Shell-check the rendered startup script
run: ../scripts/ci/check-coder-module.sh
# The .ts harness is linted/formatted from the repo root, where oxlint
# and oxfmt (and their configs) live.
- name: Lint and format TypeScript harness
working-directory: .
run: |
bun install --frozen-lockfile
bun run lint:coder-module
bun run fmt:check
- name: Test
run: bun test