Skip to content

Commit c1755d7

Browse files
authored
Setup linting CI (base#7)
* Create node.js.yml * Add a minimal buildkite pipeline for internal checks
1 parent eefc1d2 commit c1755d7

4 files changed

Lines changed: 88 additions & 2 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
_shared_step: &shared_step
2+
commands:
3+
- tools/ci/setup.sh
4+
plugins:
5+
- file:///buildkite/plugins/docker: &docker_plugin
6+
image: 652969937640.dkr.ecr.us-east-1.amazonaws.com/containers/node:v16
7+
always-pull: true
8+
propagate-environment: true
9+
propagate-uid-gid: true
10+
volumes:
11+
# Allow git operations to work
12+
- ${HOME}/.ssh:/root/.ssh
13+
- ${HOME}/.git:/root/.git
14+
environment:
15+
- 'BUILDKITE_API_TOKEN'
16+
- file:///buildkite/plugins/cache: &cache_plugin
17+
key: yarn-node-modules-{{ checksum "yarn.lock" }}-v1
18+
paths:
19+
- ./.yarn/cache
20+
- ./.yarn/install-state.gz
21+
agents:
22+
queue: docker
23+
resource_class: large
24+
retry:
25+
automatic:
26+
limit: 1
27+
env:
28+
NODE_OPTIONS: --max-old-space-size=8192
29+
30+
steps:
31+
- label: Build
32+
<<: *shared_step
33+
parallelism: 1
34+
commands:
35+
- tools/ci/setup.sh
36+
- yarn build
37+
38+
- label: Lint
39+
<<: *shared_step
40+
parallelism: 1
41+
commands:
42+
- tools/ci/setup.sh
43+
- yarn lint

.github/workflows/node.js.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [16.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- name: Install dependencies
30+
run: yarn
31+
- name: Lint
32+
run: yarn lint

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,15 @@ lint-web:
1515
yarn workspace @app/web lint
1616

1717
lint-bridge:
18-
yarn workspace @app/bridge lint
18+
yarn workspace @app/bridge lint
19+
20+
build: build-web build-bridge build-docs
21+
22+
build-web:
23+
yarn workspace @app/web build
24+
25+
build-bridge:
26+
yarn workspace @app/bridge build
27+
28+
build-docs:
29+
yarn workspace @app/base-docs build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"repository": "[email protected]::base-org/base-web.git",
66
"license": "Apache-2.0",
77
"scripts": {
8-
"build": "",
8+
"build": "make build",
99
"lint": "make lint"
1010
},
1111
"workspaces": [

0 commit comments

Comments
 (0)