added tunshell on mac #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Tests | |
on: | |
workflow_call: | |
pull_request: | |
branches: | |
- dev | |
- main | |
workflow_dispatch: | |
inputs: | |
none: | |
description: "Run Tests Manually" | |
required: false | |
concurrency: | |
group: syft-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.workflow_ref }} | |
cancel-in-progress: true | |
jobs: | |
pr-tests: | |
strategy: | |
max-parallel: 99 | |
matrix: | |
# os: [ubuntu-latest, macos-latest] | |
runner: [syftbox-sh-linux-x64, syftbox-sh-macos-arm64] | |
python-version: ["3.12", "3.11", "3.10"] | |
fail-fast: false | |
# runs-on: ${{ matrix.os }} | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
run: | | |
curl -LsSf https://astral.sh/uv/0.4.20/install.sh | sh | |
uv --version | |
- name: Install Python and create venv | |
run: | | |
uv python install ${{ matrix.python-version }} | |
uv venv | |
- name: Install pip packages | |
run: | | |
uv pip install -U tox tox-uv pytest | |
- name: Get uv cache dir | |
id: pip-cache | |
shell: bash | |
run: | | |
echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT | |
- name: Load github cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-uv-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} | |
restore-keys: | | |
${{ runner.os }}-uv-py${{ matrix.python-version }}- | |
- name: Run unit tests | |
env: | |
TOX_PYTHON: python${{ matrix.python-version }} | |
run: | | |
uv run tox -e syft.test.unit |