From 20f9cbeb6ce699bae68fbaf8a357c6090dd424fc Mon Sep 17 00:00:00 2001 From: tonyfast Date: Sat, 25 May 2024 13:47:41 -0700 Subject: [PATCH] add a workflow that uses pixi --- .github/workflows/pixi.yml | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/pixi.yml diff --git a/.github/workflows/pixi.yml b/.github/workflows/pixi.yml new file mode 100644 index 00000000..5fcad8a4 --- /dev/null +++ b/.github/workflows/pixi.yml @@ -0,0 +1,66 @@ +name: test with pixi + +on: + push: + branches: [main] + pull_request: + branches: ["*"] + workflow_dispatch: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +env: + PYTHONUNBUFFERED: "1" + PIP_DISABLE_PIP_VERSION_CHECK: "1" + USE_PIXI_VERSION: 0.22.0 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: prefix-dev/setup-pixi@v0.6.0 + with: + pixi-version: v${{ env.USE_PIXI_VERSION }} + cache: true + environments: build + - run: pixi run -ve build build + - uses: actions/upload-artifact@v4 + with: + name: nbconvert-a11y-${{ github.run_number }}-dist + path: ./dist + + test: + name: ${{ matrix.test-env }} (${{ matrix.os }} ${{ matrix.browser }}) + needs: [build] + runs-on: ${{ matrix.os }}-latest + strategy: + fail-fast: false + matrix: + os: ["ubuntu", "macos", "windows"] + # add matrix for browsers later on + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v4 + - uses: prefix-dev/setup-pixi@v0.6.0 + with: + pixi-version: v${{ env.USE_PIXI_VERSION }} + cache: true + environments: test + - uses: actions/download-artifact@v4 + with: + name: nbconvert-a11y-${{ github.run_number }}-dist + path: ./dist + # need to make this install from the wheel + - run: pixi run -ve test test + - if: always() + uses: actions/upload-artifact@v4 + with: + name: |- + nbconvert-a11y-${{ github.run_number }}-${{ matrix.test-env }}-${{ matrix.os }} + path: | + ./.pixi/task-cache-v0 + ./build/reports + ./contrib/*/build/reports \ No newline at end of file