Skip to content

🔨 Build

🔨 Build #8

Workflow file for this run

name: "🔨 Build"
on:
workflow_dispatch:
inputs:
testOnly:
description: "Run tests only?"
required: true
type: boolean
default: false
workflow_call:
inputs:
testOnly:
description: "Run tests only?"
type: boolean
default: false
concurrency: "build"
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: "📥 Checkout code"
uses: actions/checkout@v4
- name: "🔧 Setup node"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: "📦 Install dependencies"
uses: ./.github/actions/install
lint:
runs-on: ubuntu-latest
needs: [ install ]
steps:
- name: "📥 Checkout code"
uses: actions/checkout@v4
- name: "🔧 Setup node"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: "📦 Install dependencies"
uses: ./.github/actions/install
- name: "🔨 Lint"
run: yarn lint
test:
runs-on: ubuntu-latest
needs: [ install ]
if: false
steps:
- name: "📥 Checkout code"
uses: actions/checkout@v4
- name: "🔧 Setup node"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: "💽 Restore node_modules cache"
uses: reactgular/cache@v1
with:
mode: "restore"
- name: "🔨 Test"
run: ${{ env.NX }} affected -t test
storybooks:
runs-on: ubuntu-latest
needs: [ install ]
if: false
steps:
- name: "📥 Checkout code"
uses: actions/checkout@v4
- name: "🔧 Setup node"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: "📦 Install dependencies"
uses: ./.github/actions/install
- name: "🔨 Build storybooks"
run: yarn build-storybook
build:
runs-on: ubuntu-latest
needs: [ install ]
if: ${{ github.event.inputs.testOnly == false }}
steps:
- name: "📥 Checkout code"
uses: actions/checkout@v4
- name: "🔧 Setup node"
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: "📦 Install dependencies"
uses: ./.github/actions/install
- name: "💽 Restore .next/cache cache"
uses: ./.github/actions/next-cache
- name: "🔨 Build"
run: yarn build