Skip to content

Commit a6c1313

Browse files
authored
chore: Add CI tests (#4)
1 parent ae18a0a commit a6c1313

File tree

10 files changed

+2346
-750
lines changed

10 files changed

+2346
-750
lines changed

.github/.kodiak.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version = 1
2+
3+
[approve]
4+
auto_approve_usernames = ["cq-bot"]
5+
6+
[merge.message]
7+
body = "pull_request_body"
8+
cut_body_after = "Use the following steps to ensure your PR is ready to be reviewed"
9+
cut_body_and_text = true
10+
cut_body_before = "<!-- 🎉 Thank you for making CloudQuery awesome by submitting a PR 🎉 -->"
11+
title = "pull_request_title"
12+
13+
[merge]
14+
blocking_labels = ["wip", "no automerge"]
15+
notify_on_conflict = false

.github/ISSUE_TEMPLTE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: CloudQuery Central Issues Tracker
4+
url: https://github.com/cloudquery/cloudquery/issues
5+
about: Please file any issue with regards to any of CloudQuery repo in the main repository with the right labels.
6+
- name: CloudQuery Discord Support
7+
url: https://community.cloudquery.io/
8+
about: Join our community to get live support from us and the community.

.github/renovate.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
extends: ["github>cloudquery/.github//.github/renovate-node-default.json5"],
3+
}

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
- uses: actions/setup-node@v5
17+
with:
18+
node-version: 'lts/*'
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build
25+
run: |
26+
npm run build
27+
28+
test:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v5
32+
- uses: actions/setup-node@v5
33+
with:
34+
node-version: 'lts/*'
35+
cache: 'npm'
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
-
41+
# Required for the package command tests to work
42+
name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
45+
- name: Test
46+
run: |
47+
npm test
48+
49+
lint:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v5
53+
- uses: actions/setup-node@v5
54+
with:
55+
node-version: 'lts/*'
56+
cache: 'npm'
57+
58+
- name: Install dependencies
59+
run: npm ci
60+
61+
- name: Lint
62+
run: |
63+
npm run lint
64+
65+
format:
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v5
69+
- uses: actions/setup-node@v5
70+
with:
71+
node-version: 'lts/*'
72+
cache: 'npm'
73+
74+
- name: Install dependencies
75+
run: npm ci
76+
77+
- name: Format
78+
run: |
79+
npm run format:check

Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18-slim
1+
FROM node:20-slim as builder
22

33
WORKDIR /app
44

@@ -10,6 +10,16 @@ COPY . .
1010

1111
RUN npm run build
1212

13+
FROM node:20-slim AS final
14+
15+
WORKDIR /app
16+
17+
COPY --from=builder ./app/dist ./dist
18+
19+
COPY package*.json ./
20+
21+
RUN npm ci --omit=dev
22+
1323
EXPOSE 7777
1424

1525
ENTRYPOINT ["node", "dist/main.js"]
File renamed without changes.

0 commit comments

Comments
 (0)