Skip to content

Commit

Permalink
💚️removed pre releases retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
acabarbaye committed Feb 17, 2022
1 parent 78a5bee commit 6e567d0
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 38 deletions.
88 changes: 54 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ on:
branches: [ main ]

env:
python_cache_macOS_path: |
~/Library/Caches/pip
python_cache_windows_path: |
~\AppData\Local\pip\Cache
python_cache_ubuntu_path: |
~/.cache/pip
python_cache_macOS_path: ~/Library/Caches/pip
python_cache_windows_path: ~\AppData\Local\pip\Cache
python_cache_ubuntu_path: ~/.cache/pip
pipenv_version: 2021.11.9 # FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed

jobs:
# Check that a news file has been added to this branch when a PR is created
assert-news:
Expand Down Expand Up @@ -57,10 +56,12 @@ jobs:
# normal dependencies from setup.py).
# This code also forces the system to install latest tools as the ones present on the CI system may be too old
# for the process to go through properly.
# FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install flake8 pipenv pytest
python -m pipenv lock --dev -r --pre > dev-requirements.txt
python -m pip install pipenv==${{ env.pipenv_version }}
echo "Locking dependencies"
python -m pipenv lock --dev -r > dev-requirements.txt
- uses: FranzDiebold/github-env-vars-action@v2
- name: Load Python Dependencies from cache
uses: actions/cache@v2
Expand Down Expand Up @@ -94,10 +95,12 @@ jobs:
# normal dependencies from setup.py).
# This code also forces the system to install latest tools as the ones present on the CI system may be too old
# for the process to go through properly.
# FIXME upgrade when https://github.com/pypa/pipenv/issues/4430 is actually fixed
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install flake8 pipenv pytest
python -m pipenv lock --dev -r --pre > dev-requirements.txt
python -m pip install pipenv==${{ env.pipenv_version }}
echo "Locking dependencies"
python -m pipenv lock --dev -r > dev-requirements.txt
- uses: FranzDiebold/github-env-vars-action@v2
- name: Load Python Dependencies from cache
uses: actions/cache@v2
Expand Down Expand Up @@ -150,28 +153,30 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest ] # FIXME add other platforms when much quicker macOS-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
multi-platform:
- ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
# include:
# - os: windows-latest
# cache_path: ${{ env.python_cache_windows_path }}
# - os: macOS-latest
# cache_path: ${{ env.python_cache_macOS_path }}
# - os: ubuntu-latest
# cache_path: ${{ env.python_cache_ubuntu_path }}
exclude:
# include:
# - os: windows-latest
# cache_path: ${{ env.python_cache_windows_path }}
# - os: macOS-latest
# cache_path: ${{ env.python_cache_macOS_path }}
# - os: ubuntu-latest
# cache_path: ${{ env.python_cache_ubuntu_path }}
#FIXME run on every platform as on Linux when speed is equivalent
include:
- os: macOS-latest
multi-platform: false
- os: macOS-latest
python-version: 3.10
- os: macOS-latest
python-version: 3.8
- os: macOS-latest
python-version: 3.7
- os: windows-latest
multi-platform: false
python-version: 3.9
# - os: windows-latest
# multi-platform: false
# python-version: 3.9
# exclude:
# - os: macOS-latest
# multi-platform: false
# - os: windows-latest
# multi-platform: false

name: Build and test
runs-on: ${{ matrix.os }}
Expand All @@ -181,31 +186,46 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install python tools
# This code forces the system to install latest tools as the ones present on the CI system may be too old
# for the process to go through properly.
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade flake8 pytest
- if: ${{ startsWith(matrix.os, 'windows') }}
run: |
python -m pip install --upgrade pipenv
python -m pipenv -V
name: Install latest pipenv
- if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
python -m pip install pipenv==${{ env.pipenv_version }}
name: Install a fixed version of pipenv [${{ env.pipenv_version }}]
- name: Determine dependencies [OS:${{ matrix.os }}, Python:${{ matrix.python-version }}]
# Note
# The below code generates a pip requirements file from the pipenv development requirements (also obtaining the
# normal dependencies from setup.py).
# This code also forces the system to install latest tools as the ones present on the CI system may be too old
# for the process to go through properly.
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install flake8 pipenv pytest
python -m pipenv lock --dev -r --pre > dev-requirements.txt
python -m pipenv lock --dev -r > dev-requirements.txt
- if: ${{ startsWith(matrix.os, 'macOS') }}
run: echo "CACHE_PATH=${{ env.python_cache_macOS_path }}" >> $GITHUB_ENV
- if: ${{ startsWith(matrix.os, 'windows') }}
run: echo "CACHE_PATH=${{ env.python_cache_windows_path }}" >> $GITHUB_ENV
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: echo "CACHE_PATH=${{ env.python_cache_ubuntu_path }}" >> $GITHUB_ENV
- name: Cache path to load
run: |
echo "Path to dependency cache: [${{ env.CACHE_PATH }}]"
- name: Load Python Dependencies from cache
if: ${{ ! startsWith(matrix.os, 'windows') }}
uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATH }}
key: ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/dev-requirements.txt') }}
restore-keys: |
${{ matrix.os }}-pip-${{ matrix.python-version }}
# env:
# CACHE_PATH: ${{ matrix.cache_path }}
# env:
# CACHE_PATH: ${{ matrix.cache_path }}
- name: Install dependencies
# Note
# As a virtual machine is already being used, pipenv
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: GitHub Release

env:
go_version: "1.16"
pipenv_version: 2021.5.29 # FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed

on:
workflow_dispatch:
Expand All @@ -23,15 +23,16 @@ jobs:
# normal dependencies from setup.py).
# This code also forces the system to install latest tools as the ones present on the CI system may be too old
# for the process to go through properly.
# FIXME upgrade pipenv when https://github.com/pypa/pipenv/issues/4430 is actually fixed
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install flake8 pipenv pytest
python -m pipenv lock --dev -r --pre > dev-requirements.txt
python -m pip install pipenv==${{ env.pipenv_version }}
python -m pipenv lock --dev -r > dev-requirements.txt
- uses: FranzDiebold/github-env-vars-action@v2
- name: Load Python Dependencies from cache
uses: actions/cache@v2
with:
path: ${{ env.python_cache_ubuntu_path }}
path: ~/.cache/pip
key: linux-pip-3-continuous-delivery-scripts
- name: Install dependencies
# Note
Expand Down

0 comments on commit 6e567d0

Please sign in to comment.