Skip to content

Commit 477f97a

Browse files
ci(workflows): move lint and format to GitHub Actions (#7547)
* 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>
1 parent bc30e1c commit 477f97a

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,31 @@ jobs:
1414
node-version: '14.x'
1515
- name: Run yarn dedupe
1616
run: yarn dedupe --check
17+
18+
format:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js 14.x
23+
uses: actions/setup-node@v2.1.4
24+
with:
25+
node-version: '14.x'
26+
- name: Install dependencies
27+
run: yarn install --immutable --immutable-cache
28+
- name: Check formatting of project files
29+
run: yarn format:diff
30+
31+
lint:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Use Node.js 14.x
36+
uses: actions/setup-node@v2.1.4
37+
with:
38+
node-version: '14.x'
39+
- name: Install dependencies
40+
run: yarn install --immutable --immutable-cache
41+
- name: Lint JavaScript files
42+
run: yarn lint
43+
- name: Lint Sass files
44+
run: yarn lint:styles

packages/cli/src/commands/ci-check.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ async function check(args, env) {
2121
stdio: 'inherit',
2222
};
2323
const tasks = [
24-
'yarn format:diff',
25-
'yarn lint --quiet',
26-
'yarn lint:styles',
2724
`yarn bundler check --ignore '**/@(node_modules|examples|components|react|fixtures)/**' 'packages/**/*.scss'`,
2825
`cross-env BABEL_ENV=test yarn test --ci --maxWorkers 2 --reporters=default --reporters=jest-junit`,
2926
`cross-env BABEL_ENV=test yarn test:e2e --ci --maxWorkers 2 --reporters=default --reporters=jest-junit`,

packages/components/tests/spec/.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,12 @@ module.exports = {
4444
'no-unused-expressions': 0,
4545
'prefer-arrow-callback': 0,
4646
},
47+
overrides: [
48+
{
49+
files: ['*_spec.js'],
50+
rules: {
51+
'import/no-unresolved': 0,
52+
},
53+
},
54+
],
4755
};

0 commit comments

Comments
 (0)