Skip to content

Commit

Permalink
Setup linting CI (#7)
Browse files Browse the repository at this point in the history
* Create node.js.yml

* Add a minimal buildkite pipeline for internal checks
  • Loading branch information
zencephalon authored Sep 20, 2023
1 parent 7bde581 commit 49627bf
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
_shared_step: &shared_step
commands:
- tools/ci/setup.sh
plugins:
- file:///buildkite/plugins/docker: &docker_plugin
image: 652969937640.dkr.ecr.us-east-1.amazonaws.com/containers/node:v16
always-pull: true
propagate-environment: true
propagate-uid-gid: true
volumes:
# Allow git operations to work
- ${HOME}/.ssh:/root/.ssh
- ${HOME}/.git:/root/.git
environment:
- 'BUILDKITE_API_TOKEN'
- file:///buildkite/plugins/cache: &cache_plugin
key: yarn-node-modules-{{ checksum "yarn.lock" }}-v1
paths:
- ./.yarn/cache
- ./.yarn/install-state.gz
agents:
queue: docker
resource_class: large
retry:
automatic:
limit: 1
env:
NODE_OPTIONS: --max-old-space-size=8192

steps:
- label: Build
<<: *shared_step
parallelism: 1
commands:
- tools/ci/setup.sh
- yarn build

- label: Lint
<<: *shared_step
parallelism: 1
commands:
- tools/ci/setup.sh
- yarn lint
32 changes: 32 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: yarn
- name: Lint
run: yarn lint
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,15 @@ lint-web:
yarn workspace @app/web lint

lint-bridge:
yarn workspace @app/bridge lint
yarn workspace @app/bridge lint

build: build-web build-bridge build-docs

build-web:
yarn workspace @app/web build

build-bridge:
yarn workspace @app/bridge build

build-docs:
yarn workspace @app/base-docs build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"repository": "[email protected]::base-org/base-web.git",
"license": "Apache-2.0",
"scripts": {
"build": "",
"build": "make build",
"lint": "make lint"
},
"workspaces": [
Expand Down

0 comments on commit 49627bf

Please sign in to comment.