Skip to content

Commit d52026d

Browse files
authored
Move lint and doc check to actions (#1081)
1 parent b52d767 commit d52026d

File tree

2 files changed

+37
-35
lines changed

2 files changed

+37
-35
lines changed

.circleci/config.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -115,37 +115,6 @@ browsers_unit_tests: &browsers_unit_tests
115115
command: if [ "$CIRCLE_NODE_VERSION" = "v12" ]; then npm run codecov:browser; fi
116116

117117
jobs:
118-
lint_&_docs:
119-
docker:
120-
- image: node:12
121-
environment:
122-
NPM_CONFIG_UNSAFE_PERM: true
123-
steps:
124-
- checkout
125-
- run:
126-
name: Install minimal doc and lint modules globally
127-
command: npm i -g eslint@^6.8.0 eslint-plugin-node @typescript-eslint/eslint-plugin@^2.23.0 @typescript-eslint/parser@^2.23.0 eslint-plugin-header@^3.0.0 eslint-plugin-import@^2.19.1 eslint-plugin-prettier prettier lerna typedoc linkinator typescript@^3.7.2
128-
- run:
129-
name: Install gts version 2.0.0 globally
130-
command: npm i -g gts@2.0.0
131-
- run:
132-
name: Symlink global modules into all lerna packages
133-
command: lerna exec 'npm link eslint gts eslint-plugin-node @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-header eslint-plugin-import eslint-plugin-prettier prettier lerna typedoc linkinator typescript'
134-
- run:
135-
name: Check code style and linting
136-
command: npm run lint
137-
- run:
138-
name: Install doc dependencies
139-
command: lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies -- --only dev
140-
- run:
141-
name: Docs tests
142-
command: npm run docs-test
143-
- run:
144-
name: Install minimal modules to lint examples
145-
command: npm i --no-save eslint eslint-plugin-import eslint-config-airbnb-base
146-
- run:
147-
name: Lint examples
148-
command: npm run lint:examples
149118
node8:
150119
docker:
151120
- image: node:8
@@ -175,10 +144,6 @@ workflows:
175144
version: 2
176145
build:
177146
jobs:
178-
- lint_&_docs:
179-
filters:
180-
branches:
181-
only: /.*/
182147
- node8
183148
- node10
184149
- node12

.github/workflows/lint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: restore lerna
13+
uses: actions/cache@master # must use unreleased master to cache multiple paths
14+
id: cache
15+
with:
16+
path: |
17+
node_modules
18+
packages/*/node_modules
19+
metapackages/*/node_modules
20+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
21+
22+
- name: Bootstrap
23+
if: steps.cache.outputs.cache-hit != 'true'
24+
run: |
25+
npm install --only=dev --ignore-scripts
26+
npx lerna bootstrap --no-ci --ignore-scripts -- --only=dev
27+
28+
- name: Lint
29+
run: |
30+
npm run lint
31+
npm run lint:examples
32+
33+
- name: Install and Build API Dependencies
34+
run: npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies
35+
36+
- name: Test Docs
37+
run: npm run docs-test

0 commit comments

Comments
 (0)