📦️ Switch to uv and npm to build pure nix derviations #1400
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
merge_group: | |
jobs: | |
pre-commit: | |
strategy: | |
matrix: | |
os: [["ubuntu-latest"], ["self-hosted", "macOS"]] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- name: Wait for nix daemon to start | |
if: runner.os == 'macOS' | |
run: wait4path /nix/var/nix/profiles/per-user | |
- name: Initialize nix environment | |
run: nix --extra-experimental-features 'nix-command flakes' develop . | |
- name: Setup backend pypackages cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
backend/__pypackages__/ | |
key: ${{ runner.os }}-${{ runner.arch }}-pypackages-${{ hashFiles('backend/uv.lock', 'proto/transcribee_proto/*.py') }} | |
- name: Setup worker pypackages cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
worker/__pypackages__/ | |
key: ${{ runner.os }}-${{ runner.arch }}-pypackages-${{ hashFiles('worker/uv.lock', 'proto/transcribee_proto/*.py') }} | |
- name: install dependencies | |
run: nix --extra-experimental-features 'nix-command flakes' develop ./packaging/install_dependencies.sh | |
- name: cache pre-commit env | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: run pre-commit | |
run: nix --extra-experimental-features 'nix-command flakes' develop --comand 'pre-commit run --show-diff-on-failure --color=always --all-files' |