From f7f4b33e22414071fc1f9cbf68072c413c3a7fdf Mon Sep 17 00:00:00 2001 From: Eloy Coto Date: Tue, 23 Apr 2024 17:45:24 +0200 Subject: [PATCH] feat: Add github action to test this (#12) * feat: Add github action to test this Signed-off-by: Eloy Coto * Update .github/workflows/build.yaml Co-authored-by: Guillaume Desforges --------- Signed-off-by: Eloy Coto Co-authored-by: Guillaume Desforges --- .github/workflows/build.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..fef6e49 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,35 @@ +name: Check + +on: + push: + branches: + - main + - master + - action + pull_request: + branches: + - main + - master + +jobs: + check-numpy-import: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Nix + uses: cachix/install-nix-action@v22 + + - name: Install Python 3.11 with Nix + run: nix --extra-experimental-features nix-command --extra-experimental-features flakes run nixpkgs#python311 -- -m venv .venv --copies + + - name: check that using it on numpy works + run: | + echo "Install numpy" + .venv/bin/pip install numpy + echo "Run fix-python" + ./fix-python --venv .venv + echo "Check numpy works" + .venv/bin/python -c 'import numpy'