Skip to content

Monorepo Migration Fixes #12

Monorepo Migration Fixes

Monorepo Migration Fixes #12

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
main:
strategy:
fail-fast: false
matrix:
action: ['lint', 'test', 'build']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install tauri dependencies
if: ${{ matrix.action == 'build' }}
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libselinux1
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
id: restore-pnpm
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Save pnpm cache
id: save-pnpm
uses: actions/cache/save@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ steps.restore-pnpm.outputs.cache-primary-key }}
- uses: nrwl/nx-set-shas@v4
# This line is needed for nx affected to work when CI is running on a PR
- run: git branch --track main origin/main
if: ${{ github.event_name == 'pull_request' }}
- run: pnpm nx affected -t ${{ matrix.action }}