Skip to content

Commit

Permalink
ci(workflows): move lint and format to GitHub Actions (#7547)
Browse files Browse the repository at this point in the history
* ci: move lint and format to GitHub Actions

* chore(ci): update to include installing dependencies

* chore(ci): update label for format job

Co-authored-by: Andrea N. Cardona <andreancardona@gmail.com>
  • Loading branch information
joshblack and andreancardona authored Jan 15, 2021
1 parent bc30e1c commit 477f97a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
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,
},
},
],
};

0 comments on commit 477f97a

Please sign in to comment.