Skip to content

Commit

Permalink
ci: break checks ci job into separate jobs (#1114)
Browse files Browse the repository at this point in the history
* ci: add separate lint step

* ci: add ci separate steps for test and lint

* revert pr ci test change

* test remove test from check job

* fix yaml

* update yaml

* fix line spacing in yaml

* add builds and builds-docs jobs

* update builds-docs jobs

* add install to lint, builds and builds-docs jobs

* replace builds with build
  • Loading branch information
marshacb committed Nov 10, 2022
1 parent 8b5c4f7 commit e687e79
Showing 1 changed file with 93 additions and 2 deletions.
95 changes: 93 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- master

jobs:
check:
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand All @@ -34,12 +34,103 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install JS dependencies
run: yarn install

- name: Linter.
run: yarn lint:ci
tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
- name: Checkout files
uses: actions/checkout@v3

- name: Install Node v16
uses: actions/setup-node@v3
with:
node-version: '16.13'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v3
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 }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install JS dependencies
run: yarn install

- name: Unit tests.
run: yarn test

build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
- name: Checkout files
uses: actions/checkout@v3

- name: Install Node v16
uses: actions/setup-node@v3
with:
node-version: '16.13'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v3
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 }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install JS dependencies
run: yarn install

- name: Build
run: yarn build

build-docs:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
- name: Checkout files
uses: actions/checkout@v3

- name: Install Node v16
uses: actions/setup-node@v3
with:
node-version: '16.13'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v3
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 }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install JS dependencies
run: yarn install

- name: Build Docs
run: yarn build:docs


0 comments on commit e687e79

Please sign in to comment.