Skip to content

Commit b848e46

Browse files
committed
feat: Initial commit
0 parents  commit b848e46

File tree

22 files changed

+21226
-0
lines changed

22 files changed

+21226
-0
lines changed

.eslintrc.cjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
4+
parserOptions: {
5+
ecmaVersion: 2018,
6+
sourceType: 'module',
7+
},
8+
rules: {
9+
'@typescript-eslint/explicit-function-return-type': 0,
10+
'@typescript-eslint/no-non-null-assertion': 0,
11+
},
12+
};

.github/workflows/example.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: setup-cloudquery example
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
env:
11+
CQ_NO_TELEMETRY: '1'
12+
ACTIONS_RUNNER_DEBUG: true
13+
ACTIONS_STEP_DEBUG: true
14+
jobs:
15+
cloudquery-fetch:
16+
permissions:
17+
id-token: write
18+
contents: read
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
matrix:
22+
dbversion: ['postgres:latest']
23+
os: [ubuntu-latest]
24+
fail-fast: false
25+
services:
26+
postgres:
27+
image: ${{ matrix.dbversion }}
28+
env:
29+
POSTGRES_USER: postgres
30+
POSTGRES_PASSWORD: pass
31+
POSTGRES_DB: postgres
32+
ports:
33+
- 5432:5432
34+
# Set health checks to wait until postgres has started
35+
options: >-
36+
--health-cmd pg_isready
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
40+
timeout-minutes: 30
41+
steps:
42+
- uses: actions/checkout@v3
43+
- name: Configure AWS credentials
44+
uses: aws-actions/configure-aws-credentials@v1
45+
with:
46+
role-to-assume: arn:aws:iam::615713231484:role/cq-playground-aws-github-action
47+
aws-region: us-east-1
48+
- name: Setup CloudQuery
49+
uses: ./.
50+
- name: Fetch with CloudQuery
51+
run: cloudquery fetch --config example_configs/config-1.hcl
52+
- uses: actions/upload-artifact@v3
53+
if: always()
54+
with:
55+
name: 'cloudquery-config-1.log'
56+
path: 'cloudquery.log'

.github/workflows/prepare.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: prepare-dist
2+
on:
3+
push:
4+
branches:
5+
- release-*
6+
jobs:
7+
prepare-dist:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
token: ${{ secrets.GH_CQ_BOT }}
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 'lts/*'
16+
cache: 'npm'
17+
- name: Install dependencies
18+
run: npm ci
19+
- uses: stefanzweifel/git-auto-commit-action@v4
20+
with:
21+
commit_message: 'chore: Prepare dist'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: release-please
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: GoogleCloudPlatform/release-please-action@v3
11+
with:
12+
token: ${{ secrets.GH_CQ_BOT }}
13+
release-type: node
14+
package-name: '@cloudquery/setup-cloudquery'

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Use Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 'lts/*'
19+
cache: 'npm'
20+
- name: Install Dependencies
21+
run: npm ci
22+
23+
- name: Run Linter
24+
run: npm run lint
25+
26+
- name: Check Format
27+
run: npm run format:ci
28+
29+
- name: Run Build
30+
run: npm run build

.github/workflows/versioning.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Keep the versions up-to-date
2+
3+
on:
4+
release:
5+
types: [published, edited]
6+
7+
jobs:
8+
actions-tagger:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: Actions-R-Us/actions-tagger@latest
12+
with:
13+
publish_latest_tag: true
14+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
out
3+
cloudquery.log
4+
.cq
5+
cloudquery
6+
config.hcl
7+
src/hcl.js.map

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit "$1"

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run format

.prettierrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"useTabs": false,
8+
"overrides": [
9+
{
10+
"files": "*.json",
11+
"options": { "printWidth": 200 }
12+
}
13+
]
14+
}

0 commit comments

Comments
 (0)