Skip to content

Commit

Permalink
ci: improve CI runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Aug 4, 2020
1 parent 1a4a68f commit db6254e
Showing 1 changed file with 52 additions and 9 deletions.
61 changes: 52 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,28 @@ on:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@v2-beta
with:
node-version: 12
- run: npx panva/npm-install-retry
- name: Store node version variable
id: node
run: |
echo "::set-output name=version::$(node -v)"
- name: Cache node_modules
uses: actions/cache@v2
id: node_modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package.json') }}-${{ steps.node.outputs.version }}
- name: Install dependencies
run: npx panva/npm-install-retry
if: ${{ steps.node_modules.outputs.cache-hit != 'true' }}
- run: npm run lint
- run: npm run lint-ts

Expand All @@ -42,11 +57,25 @@ jobs:
- windows-latest
- macOS-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
- run: npx panva/npm-install-retry
- name: Store node version variable
id: node
run: |
echo "::set-output name=version::$(node -v)"
- name: Cache node_modules
uses: actions/cache@v2
id: node_modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package.json') }}-${{ steps.node.outputs.version }}
- name: Install dependencies
run: npx panva/npm-install-retry
if: ${{ steps.node_modules.outputs.cache-hit != 'true' }}
- run: npm run coverage
- env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -70,10 +99,24 @@ jobs:
- windows-latest
- macOS-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@v2-beta
with:
node-version: 12
- name: Store node version variable
id: node
run: |
echo "::set-output name=version::$(node -v)"
- name: Cache node_modules
uses: actions/cache@v2
id: node_modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package.json') }}-${{ steps.node.outputs.version }}
- name: Install dependencies
run: npx panva/npm-install-retry
if: ${{ steps.node_modules.outputs.cache-hit != 'true' }}
- run: npm install --global xvfb-maybe electron@${{ matrix.electron-version }}
- run: npx panva/npm-install-retry
- run: xvfb-maybe electron ./test/electron

0 comments on commit db6254e

Please sign in to comment.