Skip to content

Commit b31723d

Browse files
authored
ci: migrate to GitHub Actions instead (#322)
* ci: migrate to GitHub Actions instead * docs: sync README files
1 parent ea49cac commit b31723d

File tree

5 files changed

+62
-40
lines changed

5 files changed

+62
-40
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
ci:
9+
name: Lint and Test with Node.js ${{ matrix.node }}
10+
strategy:
11+
matrix:
12+
node:
13+
- 12
14+
- 14
15+
- 16
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@master
20+
21+
- name: Setup Node.js ${{ matrix.node }}
22+
uses: actions/setup-node@master
23+
with:
24+
node-version: ${{ matrix.node }}
25+
26+
- name: Link Yarn global binaries into PATH
27+
run: echo "$(yarn global bin)" >> $GITHUB_PATH
28+
29+
- name: Get yarn cache directory path
30+
id: yarn-cache-dir-path
31+
run: echo "::set-output name=dir::$(yarn cache dir)"
32+
33+
- uses: actions/cache@v2
34+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
35+
with:
36+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
37+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-yarn-
40+
41+
- name: Install Dependencies
42+
run: yarn --frozen-lockfile
43+
44+
- name: Build, Lint and test
45+
run: |
46+
yarn lint
47+
yarn test
48+
env:
49+
EFF_NO_LINK_RULES: true
50+
PARSER_NO_WATCH: true
51+
52+
- name: Codecov
53+
run: |
54+
yarn global add codecov # codacy-coverage
55+
codecov
56+
# cat ./coverage/lcov.info | codacy-coverage -u mdx-ks -n eslint-mdx
57+
env:
58+
CODACY_ACCOUNT_TOKEN: ${{ secrets.CODACY_ACCOUNT_TOKEN }}
59+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
</a>
1111
</p>
1212

13-
[![Travis](https://img.shields.io/travis/com/mdx-js/eslint-mdx.svg)](https://travis-ci.com/mdx-js/eslint-mdx)
14-
[![Codacy Grade](https://img.shields.io/codacy/grade/4ea8225261c04837995a858676caae4b)](https://www.codacy.com/app/JounQin/eslint-mdx)
13+
[![GitHub Actions](https://github.com/mdx-js/eslint-mdx/workflows/CI/badge.svg)](https://github.com/mdx-js/eslint-mdx/actions/workflows/ci.yml)
1514
[![Codecov](https://img.shields.io/codecov/c/gh/mdx-js/eslint-mdx)](https://codecov.io/gh/mdx-js/eslint-mdx)
1615
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fmdx-js%2Feslint-mdx%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
1716
[![GitHub release](https://img.shields.io/github/release/mdx-js/eslint-mdx)](https://github.com/mdx-js/eslint-mdx/releases)
@@ -20,7 +19,6 @@
2019
[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
2120
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
2221
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
23-
[![codechecks.io](https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true)](https://codechecks.io)
2422

2523
> [ESLint][] Parser/Plugin for [MDX][], helps you lint all ES syntaxes.
2624
> Linting `code` blocks can be enabled with `mdx/code-blocks` setting too!

packages/eslint-mdx/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
</a>
1111
</p>
1212

13-
[![Travis](https://img.shields.io/travis/com/mdx-js/eslint-mdx.svg)](https://travis-ci.com/mdx-js/eslint-mdx)
14-
[![Codacy Grade](https://img.shields.io/codacy/grade/4ea8225261c04837995a858676caae4b)](https://www.codacy.com/app/JounQin/eslint-mdx)
13+
[![GitHub Actions](https://github.com/mdx-js/eslint-mdx/workflows/CI/badge.svg)](https://github.com/mdx-js/eslint-mdx/actions/workflows/ci.yml)
1514
[![Codecov](https://img.shields.io/codecov/c/gh/mdx-js/eslint-mdx)](https://codecov.io/gh/mdx-js/eslint-mdx)
1615
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fmdx-js%2Feslint-mdx%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
1716
[![GitHub release](https://img.shields.io/github/release/mdx-js/eslint-mdx)](https://github.com/mdx-js/eslint-mdx/releases)
@@ -20,7 +19,6 @@
2019
[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
2120
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
2221
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
23-
[![codechecks.io](https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true)](https://codechecks.io)
2422

2523
> [ESLint][] Parser/Plugin for [MDX][], helps you lint all ES syntaxes.
2624
> Linting `code` blocks can be enabled with `mdx/code-blocks` setting too!

packages/eslint-plugin-mdx/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
</a>
1111
</p>
1212

13-
[![Travis](https://img.shields.io/travis/com/mdx-js/eslint-mdx.svg)](https://travis-ci.com/mdx-js/eslint-mdx)
14-
[![Codacy Grade](https://img.shields.io/codacy/grade/4ea8225261c04837995a858676caae4b)](https://www.codacy.com/app/JounQin/eslint-mdx)
13+
[![GitHub Actions](https://github.com/mdx-js/eslint-mdx/workflows/CI/badge.svg)](https://github.com/mdx-js/eslint-mdx/actions/workflows/ci.yml)
1514
[![Codecov](https://img.shields.io/codecov/c/gh/mdx-js/eslint-mdx)](https://codecov.io/gh/mdx-js/eslint-mdx)
1615
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fmdx-js%2Feslint-mdx%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
1716
[![GitHub release](https://img.shields.io/github/release/mdx-js/eslint-mdx)](https://github.com/mdx-js/eslint-mdx/releases)
@@ -20,7 +19,6 @@
2019
[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
2120
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
2221
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
23-
[![codechecks.io](https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true)](https://codechecks.io)
2422

2523
> [ESLint][] Parser/Plugin for [MDX][], helps you lint all ES syntaxes.
2624
> Linting `code` blocks can be enabled with `mdx/code-blocks` setting too!

0 commit comments

Comments
 (0)