From e3b1da78f76dbfedecba37545fe082498a261396 Mon Sep 17 00:00:00 2001 From: Felix Soubelet Date: Tue, 15 Oct 2024 21:50:52 +0200 Subject: [PATCH] how does this run --- .github/workflows/example.yml | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/example.yml diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml new file mode 100644 index 00000000..61bba2c8 --- /dev/null +++ b/.github/workflows/example.yml @@ -0,0 +1,50 @@ +# Runs all tests +name: All Tests + +defaults: + run: + shell: bash + +on: # Runs on any push event to any branch except master (the coverage workflow takes care of that) + push: + branches-ignore: + - 'master' + +env: + UV_SYSTEM_PYTHON: 1 # so that uv pip installs in the system python installed by actions/setup-python + +jobs: + uv-example: + name: ${{ matrix.os }} / ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-latest] + # Make sure to escape 3.10 with quotes so it doesn't get interpreted as float 3.1 by GA's parser + python-version: [3.9, "3.10", 3.11, 3.12] + + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + + - if: matrix.os == 'macos-latest' + name: Set up hdf5 + run: brew install hdf5 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install project package + run: uv pip install '.[test]' + +# - name: Run Tests +# run: python -m pytest + + - name: Minimize uv cache + run: uv cache prune --ci