Skip to content

perf: optimize CI/CD pipeline with caching and parallel builds (#42) #155

perf: optimize CI/CD pipeline with caching and parallel builds (#42)

perf: optimize CI/CD pipeline with caching and parallel builds (#42) #155

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
typescript:
name: TypeScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Cache Bun dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Configure git for tests
run: |
git config --global user.name "CI"
git config --global user.email "ci@test.local"
- name: Install dependencies
run: bun install
- name: Run tests
run: bun test
working-directory: packages/altimate-code
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install linter
run: pip install ruff
- name: Lint
run: ruff check src
working-directory: packages/altimate-engine
python:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: packages/altimate-engine/pyproject.toml
- name: Install dependencies
run: pip install -e ".[dev,warehouses]"
working-directory: packages/altimate-engine
- name: Run tests
run: pytest
working-directory: packages/altimate-engine