Skip to content

Commit 6be132f

Browse files
kinyoklionyusinto
andauthored
build: Add CI configuration. Rename 'node' to 'server-node'. (#55)
Co-authored-by: Yusinto Ngadiman <[email protected]>
1 parent 3e99e6a commit 6be132f

File tree

201 files changed

+4574
-2845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+4574
-2845
lines changed

.eslintrc.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ module.exports = {
22
env: {
33
node: true,
44
},
5-
extends: [
6-
'airbnb-base',
7-
'airbnb-typescript/base'
8-
],
5+
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
96
parser: '@typescript-eslint/parser',
107
parserOptions: {
11-
project: './tsconfig.eslint.json'
8+
project: './tsconfig.eslint.json',
129
},
13-
plugins: [
14-
'@typescript-eslint',
15-
],
16-
ignorePatterns: ["**/dist/**"],
10+
plugins: ['@typescript-eslint', 'prettier'],
11+
ignorePatterns: ['**/dist/**'],
1712
rules: {
13+
'prettier/prettier': ['error'],
1814
},
1915
};

.github/workflows/common.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: shared/common
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- '**.md' #Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [main]
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build-test-common:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
registry-url: 'https://registry.npmjs.org'
22+
- id: shared
23+
name: Shared CI Steps
24+
uses: ./actions/ci
25+
with:
26+
workspace_name: '@launchdarkly/js-sdk-common'
27+
workspace_path: packages/shared/common
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Lint PR title
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Verify the PR title matches conventional commit spec.
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sdk-server.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: shared/sdk-server
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- '**.md' #Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [main]
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build-test-sdk-server:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
registry-url: 'https://registry.npmjs.org'
22+
- id: shared
23+
name: Shared CI Steps
24+
uses: ./actions/ci
25+
with:
26+
workspace_name: '@launchdarkly/js-server-sdk-common'
27+
workspace_path: packages/shared/sdk-server

.github/workflows/server-node.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: sdk/server-node
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- '**.md' #Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [main]
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build-test-server-node:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
# Node versions to run on.
20+
version: [16, 19]
21+
22+
env:
23+
TEST_HARNESS_PARAMS: '--skip-from=./contract-tests/testharness-suppressions.txt'
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.version }}
30+
registry-url: 'https://registry.npmjs.org'
31+
- id: shared
32+
name: Shared CI Steps
33+
uses: ./actions/ci
34+
with:
35+
workspace_name: '@launchdarkly/node-server-sdk'
36+
workspace_path: packages/sdk/server-node
37+
- name: Contract Tests
38+
run: yarn run contract-tests

.gitignore

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ dist/
44
node_modules/
55
**/*.tsbuildinfo
66
coverage/
7-
tmp/
8-
**/docs
7+
**/tmp_test/
8+
docs/
9+
.pnp.*
10+
.yarn/*
11+
.dev*
12+
.vscode/launch.json
13+
.idea
14+
!.yarn/plugins
15+
!.yarn/releases
16+
!.yarn/sdks
17+
!.yarn/versions
918
yarn-error.log

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 100
4+
}

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.4.1.cjs

Lines changed: 873 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
nodeLinker: node-modules
2+
3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
5+
spec: '@yarnpkg/plugin-workspace-tools'
6+
7+
yarnPath: .yarn/releases/yarn-3.4.1.cjs

0 commit comments

Comments
 (0)