From 8a8e4bc5f12cb93e13947f9c058a2324a30669ed Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Fri, 5 Jul 2024 23:34:39 -0600 Subject: [PATCH 1/5] Update tests.yml --- .github/workflows/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 07f17a968..b3d2bdd86 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,8 +9,8 @@ jobs: strategy: max-parallel: 4 matrix: - # os: [macos-14, ubuntu-latest] - os: [macos-14] + os: [macos-14, ubuntu-latest] + # os: [macos-14] python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 @@ -21,7 +21,9 @@ jobs: cache: 'pip' # caching pip dependencies - name: Install dependencies run: | - python -m pip install --upgrade pip + python3 -m venv venv + source venv/bin/activate + python3 -m pip install --upgrade pip pip install -r dev_requirements.txt pip install -r requirements.txt - name: Install exiftool From 8e402cda54cfe88a7f18a0aa1a4a0733787db121 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Fri, 5 Jul 2024 23:40:46 -0600 Subject: [PATCH 2/5] Update tests.yml --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b3d2bdd86..67744e530 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,8 +24,8 @@ jobs: python3 -m venv venv source venv/bin/activate python3 -m pip install --upgrade pip - pip install -r dev_requirements.txt - pip install -r requirements.txt + python3 -m pip install -r dev_requirements.txt + python3 -m pip install -r requirements.txt - name: Install exiftool run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" From 84cd1baba36b4605d543620b7cb32c87aaa21a14 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Fri, 5 Jul 2024 23:51:28 -0600 Subject: [PATCH 3/5] Update tests.yml --- .github/workflows/tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 67744e530..0b57cc38e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,10 +19,13 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' # caching pip dependencies + - name: Activate virtualenv + run: | + python3 -m venv .venv + . .venv/bin/activate + echo PATH=$PATH >> $GITHUB_ENV - name: Install dependencies run: | - python3 -m venv venv - source venv/bin/activate python3 -m pip install --upgrade pip python3 -m pip install -r dev_requirements.txt python3 -m pip install -r requirements.txt From edc2779acc5aba0e5c28392f9557eb7e065b582d Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 6 Jul 2024 08:46:46 -0600 Subject: [PATCH 4/5] Update tests.yml --- .github/workflows/tests.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0b57cc38e..f3c86ba29 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,16 +19,23 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' # caching pip dependencies - - name: Activate virtualenv - run: | - python3 -m venv .venv - . .venv/bin/activate - echo PATH=$PATH >> $GITHUB_ENV - - name: Install dependencies - run: | - python3 -m pip install --upgrade pip - python3 -m pip install -r dev_requirements.txt - python3 -m pip install -r requirements.txt + - uses: syphar/restore-virtualenv@v1 + id: cache-virtualenv + with: + requirement_files: "*requirements.txt" + - uses: syphar/restore-pip-download-cache@v1 + if: steps.cache-virtualenv.outputs.cache-hit != 'true' + # the package installation will only be executed when the + # requirements-files have changed. + - run: pip install -r requirements.txt + if: steps.cache-virtualenv.outputs.cache-hit != 'true' + - run: pip install -r dev_requirements.txt + if: steps.cache-virtualenv.outputs.cache-hit != 'true' + # - name: Install dependencies + # run: | + # python3 -m pip install --upgrade pip + # python3 -m pip install -r dev_requirements.txt + # python3 -m pip install -r requirements.txt - name: Install exiftool run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" From c5d4034736554900d06bf57bdbd6d6a6c44f2127 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 6 Jul 2024 08:57:11 -0600 Subject: [PATCH 5/5] Added virtual env --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f3c86ba29..7f0db137c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,6 +19,8 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' # caching pip dependencies + # virtual env must be used on Linux to avoid issue with setuptools + # this action creates and activates a virtual env while also caching it - uses: syphar/restore-virtualenv@v1 id: cache-virtualenv with: