Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: move lint and format to GitHub Actions #7547

Merged
merged 5 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,31 @@ jobs:
node-version: '14.x'
- name: Run yarn dedupe
run: yarn dedupe --check

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2.1.4
with:
node-version: '14.x'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Check formatting of project files
run: yarn format:diff

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2.1.4
with:
node-version: '14.x'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Lint JavaScript files
run: yarn lint
- name: Lint Sass files
run: yarn lint:styles
3 changes: 0 additions & 3 deletions packages/cli/src/commands/ci-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ async function check(args, env) {
stdio: 'inherit',
};
const tasks = [
'yarn format:diff',
'yarn lint --quiet',
'yarn lint:styles',
`yarn bundler check --ignore '**/@(node_modules|examples|components|react|fixtures)/**' 'packages/**/*.scss'`,
`cross-env BABEL_ENV=test yarn test --ci --maxWorkers 2 --reporters=default --reporters=jest-junit`,
`cross-env BABEL_ENV=test yarn test:e2e --ci --maxWorkers 2 --reporters=default --reporters=jest-junit`,
Expand Down
8 changes: 8 additions & 0 deletions packages/components/tests/spec/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,12 @@ module.exports = {
'no-unused-expressions': 0,
'prefer-arrow-callback': 0,
},
overrides: [
{
files: ['*_spec.js'],
rules: {
'import/no-unresolved': 0,
},
},
],
};