Skip to content

Commit

Permalink
Fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 18, 2020
1 parent be256e4 commit 8656cca
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 93 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ settings:
version: 16.3.2

overrides:
- files: '*.md'
extends: plugin:mdx/recommended

- files: '*.mdx'
extends:
- plugin:mdx/recommended
- plugin:mdx/overrides
rules:
import/no-extraneous-dependencies: 0
prettier/prettier: 0

- files:
- '**/test/**/*.js'
Expand Down
30 changes: 12 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,40 @@ jobs:
name: Build and Test on ${{ matrix.os }} with Node.js ${{ matrix.node }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [10, 14]
os:
- ubuntu-latest
- windows-latest
node:
- 10
- 14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node }}

- name: Setup yarn
if: matrix.os != 'windows-latest'
- name: Get yarn
run: |
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$PATH"
- name: Get yarn cache directory path
- name: Get yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
- name: Set yarn cache
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-yarn-
- name: Install Dependencies
- name: Install
run: yarn --frozen-lockfile
env:
CI: 'true'

- name: Build
if: matrix.os != 'windows-latest'
run: yarn build

- name: Test
run: yarn test

# To do: macos isn’t used anymore
- name: Publish CI tag to npm
if: matrix.node == 12 && matrix.os == 'macOS-latest' && github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/types.yml

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
"docs-build": "gatsby build",
"docs-deploy": "now && now alias $(pbpaste) mdxjs.com && now alias $(pbpaste) www.mdxjs.com",
"format": "yarn lint --fix",
"lint": "eslint . --cache --ext js,jsx,md,mdx -f friendly",
"lint": "eslint . --cache --ext js,jsx,mdx -f friendly",
"now-build": "yarn build && yarn docs-build",
"postinstall": "yarn-deduplicate || exit 0",
"prepublishOnly": "yarn build",
"pretest": "yarn build",
"publish": "lerna publish --force-publish=\"*\"",
"publish-ci": "lerna publish -y --canary --preid ci --pre-dist-tag ci",
"publish-next": "lerna publish --force-publish=\"*\" --pre-dist-tag next --preid next",
"test-only": "lerna run test --no-private",
"test": "lerna run test --no-private"
"test": "yarn build && yarn lint && yarn test-only"
},
"dependencies": {},
"devDependencies": {
Expand Down

0 comments on commit 8656cca

Please sign in to comment.