Skip to content

Commit

Permalink
Move lint and doc check to actions (#1081)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Jun 3, 2020
1 parent b52d767 commit d52026d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 35 deletions.
35 changes: 0 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,37 +115,6 @@ browsers_unit_tests: &browsers_unit_tests
command: if [ "$CIRCLE_NODE_VERSION" = "v12" ]; then npm run codecov:browser; fi

jobs:
lint_&_docs:
docker:
- image: node:12
environment:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- checkout
- run:
name: Install minimal doc and lint modules globally
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
- run:
name: Install gts version 2.0.0 globally
command: npm i -g gts@2.0.0
- run:
name: Symlink global modules into all lerna packages
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'
- run:
name: Check code style and linting
command: npm run lint
- run:
name: Install doc dependencies
command: lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies -- --only dev
- run:
name: Docs tests
command: npm run docs-test
- run:
name: Install minimal modules to lint examples
command: npm i --no-save eslint eslint-plugin-import eslint-config-airbnb-base
- run:
name: Lint examples
command: npm run lint:examples
node8:
docker:
- image: node:8
Expand Down Expand Up @@ -175,10 +144,6 @@ workflows:
version: 2
build:
jobs:
- lint_&_docs:
filters:
branches:
only: /.*/
- node8
- node10
- node12
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: restore lerna
uses: actions/cache@master # must use unreleased master to cache multiple paths
id: cache
with:
path: |
node_modules
packages/*/node_modules
metapackages/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --only=dev --ignore-scripts
npx lerna bootstrap --no-ci --ignore-scripts -- --only=dev
- name: Lint
run: |
npm run lint
npm run lint:examples
- name: Install and Build API Dependencies
run: npx lerna bootstrap --no-ci --scope @opentelemetry/api --include-filtered-dependencies

- name: Test Docs
run: npm run docs-test

0 comments on commit d52026d

Please sign in to comment.