Skip to content

Commit

Permalink
fixup! Refactor(ci): Move code quality checks into separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Sep 20, 2024
1 parent 8377c38 commit e145b73
Showing 1 changed file with 49 additions and 17 deletions.
66 changes: 49 additions & 17 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ env:
NX_NO_CLOUD: true

jobs:
build:
name: 🏗️ Build
install:
name: 🧶 Install
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
Expand All @@ -26,22 +26,51 @@ jobs:
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install

- name: Save Repository to Cache
uses: actions/cache/save@v4
with:
path: ./
key: repository-cache-${{ hashFiles('**/yarn.lock') }}

build:
name: 🏗️ Build
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
HUSKY: 0

steps:
- name: Restore Repository from Cache
uses: actions/cache/restore@v4
id: restore-repository-cache
with:
path: ./
key: repository-cache-${{ hashFiles('**/yarn.lock') }}

- name: Build
run: yarn build

- name: Save Repository to Cache
uses: actions/cache/save@v4
with:
path: ./
key: repository-builds-cache-${{ hashFiles('**/build') }}

lint:
name: 📐 Code Linting
needs: [build]
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
HUSKY: 0

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install
- name: Restore Repository from Cache
uses: actions/cache/restore@v4
id: restore-repository-cache
with:
path: ./
key: repository-builds-cache-${{ hashFiles('**/build') }}

- name: Lint
run: yarn lint
Expand All @@ -55,11 +84,12 @@ jobs:
HUSKY: 0

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install
- name: Restore Repository from Cache
uses: actions/cache/restore@v4
id: restore-repository-cache
with:
path: ./
key: repository-builds-cache-${{ hashFiles('**/build') }}

- name: Unit Tests
run: yarn test:unit
Expand Down Expand Up @@ -113,17 +143,19 @@ jobs:

types:
name: 📘 Type Checking
needs: [build]
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
HUSKY: 0

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install
- name: Restore Repository from Cache
uses: actions/cache/restore@v4
id: restore-repository-cache
with:
path: ./
key: repository-builds-cache-${{ hashFiles('**/build') }}

- name: Types Check
run: yarn types

0 comments on commit e145b73

Please sign in to comment.