Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 55 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,71 @@ on:
branches: ['main']
pull_request:
branches: ['main']

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install deps
- name: Install global dependencies
run: |
npm install --global yarn
yarn install
git config --global user.email "ci@example.com"
git config --global user.name "CI"

# Core project
- name: Get core yarn cache directory path
id: core-yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Cache core yarn cache
uses: actions/cache@v3
id: core-yarn-cache
with:
path: ${{ steps.core-yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-core-${{ hashFiles('core/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-core-

- name: Install dependencies in core
run: |
cd core
HUSKY=0 yarn install --frozen-lockfile

- name: Yarn lint
run: yarn run lint
# LBA project
- name: Get lba yarn cache directory path
id: lba-yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Cache lba yarn cache
uses: actions/cache@v3
id: lba-yarn-cache
with:
path: ${{ steps.lba-yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-lba-${{ hashFiles('lba/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-lba-

- name: Install dependencies in lba
run: |
cd lba
HUSKY=0 yarn install --frozen-lockfile

- name: Run lint in core
run: |
cd core
yarn run lint

- name: Run lint in lba
run: |
cd lba
yarn run lint
Loading