Skip to content

Add fix and test for the unsqueeze issue in https://github.com/samuel… #20

Add fix and test for the unsqueeze issue in https://github.com/samuel…

Add fix and test for the unsqueeze issue in https://github.com/samuel… #20

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
steps:
# This step should be a no-op on actual GitHub Actions, but it is necessary when using the "Micro" image with
# https://github.com/nektos/act. See https://github.com/nektos/act/issues/107 and
# https://github.com/nektos/act/issues/269.
#
# We use `sudo --version` to selectively run the install only when not on GitHub Actions.
- run: sudo --version || (apt update && apt install -y curl git sudo xz-utils)
- uses: "cachix/install-nix-action@v22"
with:
extra_nix_config: experimental-features = nix-command flakes
nix_path: nixpkgs=channel:nixos-unstable
- name: nix-info
run: "nix-shell -p nix-info --run 'nix-info -m'"
- name: Checkout
uses: actions/checkout@v4
- name: Lint
run: "nix develop --command ruff check ."
- name: Format
run: "nix develop --command ruff format --diff ."
# `nix build` also runs pytest, but it does so in a restrictive sandbox that disallows network. This means that we
# can't run any tests that download weights. Running outside of the nix build environment allows us to run those
# tests as well.
- name: pytest
run: "nix develop --command pytest"
- name: Build
run: "nix build"