From 62492a069c59ab10e4b1120fc7b6f62813a50c1d Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Thu, 22 Aug 2024 17:44:39 +0100 Subject: [PATCH] Add basic CI --- .github/workflows/test.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..54fe681 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: "Test package" + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + build-and-test: + name: Tests example and packaging + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: "ubuntu-24.04" + python: "3.10" + deps: "sudo apt update && sudo apt install -y ghostscript imagemagick" + - os: "macos-14" + python: "3.11" + deps: "brew install ghostscript imagemagick" + - os: "windows-2022" + python: "3.12" + deps: "choco install ghostscript imagemagick -y" + + steps: + - name: checkout repo + uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: install python package + run: | + pip install --upgrade pip setuptools wheel + pip install .[dev] + + - name: run pytest + run: | + pytest