Skip to content

Commit

Permalink
ci: merge unit test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Dec 28, 2020
1 parent e905020 commit 4fe02c8
Showing 1 changed file with 20 additions and 57 deletions.
77 changes: 20 additions & 57 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,45 @@ on:

jobs:
lint:
name: Lint
name: Lint Code
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Install
run: yarn --immutable
run: yarn --frozen-lockfile
- name: Run ESLint
run: yarn lint
- name: Run Prettier
run: yarn lint:prettier:ci
- name: Compile TypeScript Definition File
run: yarn tsc

macos:
name: macOS Build
unittests:
name: Unit Tests
if: github.event.pull_request.draft == false
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
runs-on: macos-latest
os: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
yarn --immutable
brew install unrtf
run: yarn --frozen-lockfile
- name: Install macOS dependencies
if: matrix.os == 'macos-latest'
run: brew install unrtf
- name: Install Ubuntu dependencies
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get -y install unrtf
- name: Run Tests
run: yarn jest-coverage
- name: Coveralls Parallel
Expand All @@ -50,56 +59,10 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true

ubuntu:
name: Ubuntu Build
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
yarn --immutable
sudo apt-get -y install unrtf
- name: Run Tests
run: yarn jest-coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true

windows:
name: Windows Build
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn --immutable
- name: Run Tests
run: |
yarn jest-coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true

coverage:
name: Aggregate Coverage Calculations
needs: [macos, ubuntu, windows]
if: github.event.pull_request.draft == false
needs: unittests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
Expand All @@ -110,7 +73,7 @@ jobs:

automerge:
name: Automatically merge Dependabot pull requests
needs: [lint, macos, ubuntu, windows]
needs: [lint, unittests]
runs-on: ubuntu-latest
steps:
- uses: fastify/github-action-merge-dependabot@v1
Expand Down

0 comments on commit 4fe02c8

Please sign in to comment.